summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2013-09-25 14:50:15 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2013-09-25 17:26:28 -0400
commitbb5c4c8497157afddcb5ced7e16c5dad4e893a03 (patch)
treefadc16c10eb62288303565274fa5abebc300697d /pango/pango-attributes.c
parent9d2ff982c2c0a9b7ca96bb05416b4c0a92c8db18 (diff)
downloadpango-bb5c4c8497157afddcb5ced7e16c5dad4e893a03.tar.gz
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
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r--pango/pango-attributes.c8
1 files 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));
+ }
}
/**