diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-12-07 05:23:57 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-12-07 05:23:57 +0000 |
commit | 92e4745dbbd339b8756a6b793d1610462089e49f (patch) | |
tree | 8f8db3609a7b7016156ef1ade3c3e0fc11a190e5 /pango | |
parent | 5aa7dd3136efec76b577b65cbc6962728f3f66bf (diff) | |
download | pango-92e4745dbbd339b8756a6b793d1610462089e49f.tar.gz |
Don't use face->generic.data to hold the size the face is currently set
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
use face->generic.data to hold the size the face is
currently set to; we don't need it currently and
it interferes with the use of face->generic.data for
OpenType data. (#93822, frequently reported bug)
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangoft2.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/pango/pangoft2.c b/pango/pangoft2.c index b404eb98..60770be7 100644 --- a/pango/pangoft2.c +++ b/pango/pangoft2.c @@ -243,26 +243,20 @@ pango_ft2_font_get_face (PangoFont *font) bail0: load_fallback_face (ft2font, filename); } - ft2font->face->generic.data = 0; - } - g_assert (ft2font->face); - - if (!set_unicode_charmap (ft2font->face)) - { - g_warning ("Unable to load unicode charmap from font file %s", filename); + g_assert (ft2font->face); - FT_Done_Face (ft2font->face); - ft2font->face = NULL; - - load_fallback_face (ft2font, filename); - } - - face = ft2font->face; + if (!set_unicode_charmap (ft2font->face)) + { + g_warning ("Unable to load unicode charmap from font file %s", filename); + + FT_Done_Face (ft2font->face); + ft2font->face = NULL; + + load_fallback_face (ft2font, filename); + } - if (ft2font->size != GPOINTER_TO_UINT (face->generic.data)) - { - face->generic.data = GUINT_TO_POINTER (ft2font->size); + face = ft2font->face; error = FT_Set_Char_Size (face, PANGO_PIXELS_26_6 (ft2font->size), |