Revert "Fix Win32 and CoreText cairo backends to take cairo CTM into account"
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 4 Mar 2013 22:45:03 +0000 (17:45 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 4 Mar 2013 22:45:03 +0000 (17:45 -0500)
This reverts commit b359bb484bc7d27a835cfd6d9ffcaed582ebf2ae.

Bug 694918 - Pango layout is rendered in wrong size if we have
non-identity cairo transformation matrix

I was wrong blindly copying this logic from pangocairo-fc into
pangocairo-win32 and pangocairo-quartz.

The reason we need the it in pangofc is because the fontsize we
get back from fontconfig is multiplied by the ctm scale factor,
so we undo it when loading the font.  The same is NOT true about
the non-fc backends, so the copying was totally wrong.

pango/pangocairo-coretextfont.c
pango/pangocairo-win32font.c

index 0f2a9ef..290a5cc 100644 (file)
@@ -220,8 +220,6 @@ _pango_cairo_core_text_font_new (PangoCairoCoreTextFontMap  *cafontmap,
   abs_size = pango_core_text_font_key_get_absolute_size (key);
   size = pango_units_to_double (abs_size);
 
-  size /= pango_matrix_get_font_scale_factor (pango_core_text_font_key_get_matrix (key));
-
   ctdescriptor = pango_core_text_font_key_get_ctfontdescriptor (key);
   font_ref = CTFontCreateWithFontDescriptor (ctdescriptor, size, NULL);
 
index 61d7d60..59f7c0f 100644 (file)
@@ -252,9 +252,6 @@ _pango_cairo_win32_font_new (PangoCairoWin32FontMap     *cwfontmap,
   if (!pango_font_description_get_size_is_absolute (desc))
     size *= dpi / 72.;
 
-  if (context)
-    size /= pango_matrix_get_font_scale_factor (pango_context_get_matrix (context));
-
 #ifdef USE_FACE_CACHED_FONTS
   win32fontmap = PANGO_WIN32_FONT_MAP (cwfontmap);