summaryrefslogtreecommitdiff
path: root/pango/pangoxft-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-01-29 23:06:59 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-01-29 23:06:59 +0000
commit1a00555cd87c8454301b65fe7939e277b7d67998 (patch)
treee990bb0669d6b249f3d8c7bc71145c4f5fb43ac9 /pango/pangoxft-font.c
parent9d18a76a5d226de48eb41f0c2ba23d7e42195ff8 (diff)
downloadpango-1a00555cd87c8454301b65fe7939e277b7d67998.tar.gz
If locking font face failed, do not assert, just return zero glyphs with
2006-01-29 Behdad Esfahbod <behdad@gnome.org> * modules/arabic/arabic-fc.c, modules/basic/basic-fc.c modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c modules/thai/thai-ot.c, modules/thai/thai-shaper.c modules/tibetan/tibetan-fc.c: If locking font face failed, do not assert, just return zero glyphs with an implicit warning. * pango/fonts.c, pango/glyphstring.c pango/modules.c pango/pango-color.c, pango/pango-context.c pango/pango-coverage.c, pango/pango-fontmap.c pango/pango-glyph-item.c, pango/pango-item.c pango/pango-layout.c, pango/pango-markup.c pango/pango-ot-buffer.c, pango/pango-script.c pango/pango-tabs.c, pango/pango-utils.c pango/pangoatsui-fontmap.c, pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap.c, pango/pangocairo-fontmap.c pango/pangocairo-win32font.c, pango/pangofc-font.c pango/pangofc-fontmap.c, pango/pangoft2-fontmap.c pango/pangoft2-render.c, pango/pangoft2.c pango/pangowin32-fontcache.c, pango/pangoxft-font.c pango/pangoxft-render.c, pango/break.c pango/ellipsize.c: Use g_slice for allocating all types. Also, change some g_error's to g_critical's...
Diffstat (limited to 'pango/pangoxft-font.c')
-rw-r--r--pango/pangoxft-font.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 4a0c9819..2e26dbad 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -269,6 +269,12 @@ typedef struct
} Extents;
static void
+extents_free (Extents *ext)
+{
+ g_slice_free (Extents, ext);
+}
+
+static void
get_glyph_extents_raw (PangoXftFont *xfont,
PangoGlyph glyph,
PangoRectangle *ink_rect,
@@ -278,14 +284,14 @@ get_glyph_extents_raw (PangoXftFont *xfont,
if (!xfont->glyph_info)
xfont->glyph_info = g_hash_table_new_full (NULL, NULL,
- NULL, (GDestroyNotify)g_free);
+ NULL, (GDestroyNotify)extents_free);
extents = g_hash_table_lookup (xfont->glyph_info,
GUINT_TO_POINTER (glyph));
if (!extents)
{
- extents = g_new (Extents, 1);
+ extents = g_slice_new (Extents);
pango_fc_font_get_raw_extents (PANGO_FC_FONT (xfont),
FT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING,