diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2009-01-28 22:08:18 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2009-01-28 22:08:18 +0000 |
commit | b977724d2b8ed77829b3c7cd988b45db9b12090f (patch) | |
tree | fde725224adc157e1ccc3b072bf6737572f3360f /pango/pango-fontset.c | |
parent | 042b6e674a82f7749c9762170aef4b5fb52a4f05 (diff) | |
download | pango-b977724d2b8ed77829b3c7cd988b45db9b12090f.tar.gz |
Bug 566727 – PangoFontsetLazy
2009-01-27 Behdad Esfahbod <behdad@gnome.org>
Bug 566727 – PangoFontsetLazy
* pango/pangofc-fontmap.c: Rework caching.
Cache FcFontSort results separately from PangoFontset's.
Add PangoFcFontset which is lazy and does not create fonts until it
really needs to.
Use FcFontMatch() and only do FcFontSort() if fallback fonts are
needed.
svn path=/trunk/; revision=2809
Diffstat (limited to 'pango/pango-fontset.c')
-rw-r--r-- | pango/pango-fontset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c index 62b27aed..ce1eb33d 100644 --- a/pango/pango-fontset.c +++ b/pango/pango-fontset.c @@ -382,6 +382,9 @@ pango_fontset_simple_get_font (PangoFontset *fontset, } } + if (G_UNLIKELY (result == -1)) + return NULL; + font = g_ptr_array_index(simple->fonts, result); return g_object_ref (font); } |