[pango] pango_attr_iterator_get_font(): handle scaling absolute font sizes



commit bb5c4c8497157afddcb5ced7e16c5dad4e893a03
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Sep 25 14:50:15 2013 -0400

    pango_attr_iterator_get_font(): handle scaling absolute font sizes
    
    When handling PANGO_ATTR_SCALE on a font description with an absolute
    size, properly preserve the absolute flag when setting the scaled
    size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708778

 pango/pango-attributes.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 4f9b1d5..9551eb6 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1936,8 +1936,12 @@ pango_attr_iterator_get_font (PangoAttrIterator     *iterator,
     }
 
   if (have_scale)
-    pango_font_description_set_size (desc, scale * pango_font_description_get_size (desc));
-
+    {
+      if (pango_font_description_get_size_is_absolute (desc))
+        pango_font_description_set_absolute_size (desc, scale * pango_font_description_get_size (desc));
+      else
+        pango_font_description_set_size (desc, scale * pango_font_description_get_size (desc));
+    }
 }
 
 /**


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