mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 09:34:05 +01:00
[vector] Fix PDF MediaBox orientation
The MediaBox negated the y-range like SVG viewBox does, but the SVG output is wrapped in scale(1,-1), and PDF content is emitted y-up.
This commit is contained in:
1 parent
a1b0b0046c
commit
f7a8ef5022
2 files changed
+7
-7
No files matched your search
@@ -1612,11 +1612,11 @@ hb_vector_paint_render_pdf (hb_vector_paint_t *paint)
|
||||
out.append_str ("3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [");
|
||||
out.append_num (ex);
|
||||
out.append_c (' ');
|
||||
out.append_num (-(ey + eh));
|
||||
out.append_num (ey);
|
||||
out.append_c (' ');
|
||||
out.append_num (ex + ew);
|
||||
out.append_c (' ');
|
||||
out.append_num (-ey);
|
||||
out.append_num (ey + eh);
|
||||
out.append_str ("]\n/Contents 4 0 R");
|
||||
|
||||
/* Resources. */
|
||||
@@ -1674,7 +1674,7 @@ hb_vector_paint_render_pdf (hb_vector_paint_t *paint)
|
||||
bg_prefix.append_str (" rg\n");
|
||||
bg_prefix.append_num (ex);
|
||||
bg_prefix.append_c (' ');
|
||||
bg_prefix.append_num (-(ey + eh));
|
||||
bg_prefix.append_num (ey);
|
||||
bg_prefix.append_c (' ');
|
||||
bg_prefix.append_num (ew);
|
||||
bg_prefix.append_c (' ');
|
||||
|
||||
@@ -7,14 +7,14 @@ endobj
|
||||
<< /Type /Pages /Kids [3 0 R] /Count 1 >>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Page /Parent 2 0 R /MediaBox [-16 -57360 65552 8208]
|
||||
<< /Type /Page /Parent 2 0 R /MediaBox [-16 -8208 65552 57360]
|
||||
/Contents 4 0 R >>
|
||||
endobj
|
||||
4 0 obj
|
||||
<< /Length 4593 >>
|
||||
<< /Length 4592 >>
|
||||
stream
|
||||
1 1 1 rg
|
||||
-16 -57360 65568 65568 re f
|
||||
-16 -8208 65568 65568 re f
|
||||
q
|
||||
1 0 0 1 0 0 cm
|
||||
q
|
||||
@@ -161,5 +161,5 @@ xref
|
||||
trailer
|
||||
<< /Size 5 /Root 1 0 R >>
|
||||
startxref
|
||||
4862
|
||||
4861
|
||||
%%EOF
|
||||
Reference in new issue
Block a user