diff options
author | Morten Welinder <terra@gnome.org> | 2003-11-18 14:01:47 +0000 |
---|---|---|
committer | Morten Welinder <mortenw@src.gnome.org> | 2003-11-18 14:01:47 +0000 |
commit | 0833fd45a0dcbe674adb096d975b35d4eb995b84 (patch) | |
tree | 74238ef5bec5fa1e0d4260f910dd3db51cdc7df8 /pango/pango-attributes.c | |
parent | 1b17d626452d671b419db9e2beaef9dd13010555 (diff) | |
download | pango-0833fd45a0dcbe674adb096d975b35d4eb995b84.tar.gz |
Fix _SCALE semantics. Fixes bug 121543; patch from Owen.
2003-11-18 Morten Welinder <terra@gnome.org>
* pango/pango-attributes.c (pango_attr_iterator_get_font): Fix
_SCALE semantics. Fixes bug 121543; patch from Owen.
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r-- | pango/pango-attributes.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 275de0ac..85562f47 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1390,6 +1390,8 @@ pango_attr_iterator_get_font (PangoAttrIterator *iterator, PangoFontMask mask = 0; gboolean have_language = FALSE; + gdouble scale = 0; + gboolean have_scale = FALSE; g_return_if_fail (iterator != NULL); g_return_if_fail (desc != NULL); @@ -1460,11 +1462,10 @@ pango_attr_iterator_get_font (PangoAttrIterator *iterator, } break; case PANGO_ATTR_SCALE: - if (!(mask & PANGO_FONT_MASK_SIZE)) + if (!have_scale) { - mask |= PANGO_FONT_MASK_SIZE; - pango_font_description_set_size (desc, - ((PangoAttrFloat *)attr)->value * pango_font_description_get_size (desc)); + have_scale = TRUE; + scale = ((PangoAttrFloat *)attr)->value; } break; case PANGO_ATTR_LANGUAGE: @@ -1500,6 +1501,10 @@ pango_attr_iterator_get_font (PangoAttrIterator *iterator, } } } + + if (have_scale) + pango_font_description_set_size (desc, scale * pango_font_description_get_size (desc)); + } /** |