[poppler] poppler/poppler: CairoOutputDev.cc,1.44,1.45

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Tue Nov 7 15:53:33 PST 2006


Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv4016/poppler

Modified Files:
	CairoOutputDev.cc 
Log Message:
2006-11-07  Jeff Muizelaar  <jeff at infidigm.net>

	* poppler/CairoOutputDev.cc: take horizontal scaling into account
	when updating the font. Also, cleanup some unused code. Fixes #8924.


Index: CairoOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDev.cc,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- CairoOutputDev.cc	21 Sep 2006 00:56:33 -0000	1.44
+++ CairoOutputDev.cc	7 Nov 2006 23:53:31 -0000	1.45
@@ -263,8 +263,6 @@
 
 void CairoOutputDev::updateFont(GfxState *state) {
   cairo_font_face_t *font_face;
-  double m11, m12, m21, m22;
-  double w;
   cairo_matrix_t matrix;
 
   LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString()));
@@ -278,9 +276,6 @@
 
   if (!currentFont)
     return;
-  state->getFontTransMat(&m11, &m12, &m21, &m22);
-  m11 *= state->getHorizScaling();
-  m12 *= state->getHorizScaling();
 
   LOG(printf ("font matrix: %f %f %f %f\n", m11, m12, m21, m22));
   
@@ -289,8 +284,8 @@
  
   double fontSize = state->getFontSize();
   double *m = state->getTextMat();
-  matrix.xx = m[0] * fontSize;
-  matrix.yx = m[1] * fontSize;
+  matrix.xx = m[0] * fontSize * state->getHorizScaling();
+  matrix.yx = m[1] * fontSize * state->getHorizScaling();
   matrix.xy = -m[2] * fontSize;
   matrix.yy = -m[3] * fontSize;
   matrix.x0 = 0;



More information about the poppler mailing list