[pango] Revert "Fix Win32 and CoreText cairo backends to take cairo CTM into account"



commit 25ad29b488d3e2ae10e4fee25602409fa39207f1
Author: Behdad Esfahbod <behdad behdad org>
Date:   Mon Mar 4 17:45:03 2013 -0500

    Revert "Fix Win32 and CoreText cairo backends to take cairo CTM into account"
    
    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 |    2 --
 pango/pangocairo-win32font.c    |    3 ---
 2 files changed, 0 insertions(+), 5 deletions(-)
---
diff --git a/pango/pangocairo-coretextfont.c b/pango/pangocairo-coretextfont.c
index 0f2a9ef..290a5cc 100644
--- a/pango/pangocairo-coretextfont.c
+++ b/pango/pangocairo-coretextfont.c
@@ -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);
 
diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c
index 61d7d60..59f7c0f 100644
--- a/pango/pangocairo-win32font.c
+++ b/pango/pangocairo-win32font.c
@@ -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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]