From bb5c4c8497157afddcb5ced7e16c5dad4e893a03 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 25 Sep 2013 14:50:15 -0400 Subject: 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 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 4f9b1d55..9551eb60 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)); + } } /** -- cgit v1.2.1