[PATCH] Ensure both the font matrix and y-axis flip are in the matrix

Adrian Johnson ajohnson at redneon.com
Sat Nov 1 03:17:05 PDT 2008


we use for transforming the glyph metrics.
---
 poppler/CairoFontEngine.cc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index dc975be..6910196 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -566,7 +566,7 @@ _render_type3_glyph (cairo_scaled_font_t  *scaled_font,
   Dict *charProcs;
   Object charProc;
   CairoOutputDev *output_dev;
-  cairo_matrix_t matrix;
+  cairo_matrix_t matrix, invert_y_axis;
   double *mat;
   double wx, wy;
   PDFRectangle box;
@@ -595,8 +595,8 @@ _render_type3_glyph (cairo_scaled_font_t  *scaled_font,
   matrix.yy = mat[3];
   matrix.x0 = mat[4];
   matrix.y0 = mat[5];
-  cairo_transform (cr, &matrix);
-  cairo_matrix_init_scale (&matrix, 1, -1);
+  cairo_matrix_init_scale (&invert_y_axis, 1, -1);
+  cairo_matrix_multiply (&matrix, &matrix, &invert_y_axis);
   cairo_transform (cr, &matrix);
 
   output_dev = new CairoOutputDev();
-- 
1.5.6.3


--------------030001040407080907060508
Content-Type: text/x-patch;
 name="0002-Use-the-font-BBox-not-the-font-matrix-to-set-the-Gf.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename*0="0002-Use-the-font-BBox-not-the-font-matrix-to-set-the-Gf.pat";
 filename*1="ch"



More information about the poppler mailing list