summaryrefslogtreecommitdiff
path: root/pango/pangowin32-fontcache.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/pangowin32-fontcache.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/pangowin32-fontcache.c')
-rw-r--r--pango/pangowin32-fontcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangowin32-fontcache.c b/pango/pangowin32-fontcache.c
index fae691e3..1fd64e19 100644
--- a/pango/pangowin32-fontcache.c
+++ b/pango/pangowin32-fontcache.c
@@ -61,7 +61,7 @@ free_cache_entry (LOGFONT *logfont,
if (!DeleteObject (entry->hfont))
PING (("DeleteObject for hfont %p failed", entry->hfont));
- g_free (entry);
+ g_slice_free (CacheEntry, entry);
}
/**
@@ -82,6 +82,8 @@ pango_win32_font_cache_free (PangoWin32FontCache *cache)
g_hash_table_destroy (cache->back);
g_list_free (cache->mru);
+
+ g_slice_free (PangoWin32FontCache, cache);
}
static guint
@@ -127,7 +129,7 @@ pango_win32_font_cache_new (void)
{
PangoWin32FontCache *cache;
- cache = g_new (PangoWin32FontCache, 1);
+ cache = g_slice_new (PangoWin32FontCache);
cache->forward = g_hash_table_new (logfont_hash, logfont_equal);
cache->back = g_hash_table_new (g_direct_hash, g_direct_equal);
@@ -290,7 +292,7 @@ pango_win32_font_cache_load (PangoWin32FontCache *cache,
if (!hfont)
return NULL;
- entry = g_new (CacheEntry, 1);
+ entry = g_slice_new (CacheEntry);
entry->logfont = lf;
entry->hfont = hfont;