diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-01-29 23:06:59 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-01-29 23:06:59 +0000 |
commit | 1a00555cd87c8454301b65fe7939e277b7d67998 (patch) | |
tree | e990bb0669d6b249f3d8c7bc71145c4f5fb43ac9 /modules/khmer/khmer-fc.c | |
parent | 9d18a76a5d226de48eb41f0c2ba23d7e42195ff8 (diff) | |
download | pango-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 'modules/khmer/khmer-fc.c')
-rw-r--r-- | modules/khmer/khmer-fc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/modules/khmer/khmer-fc.c b/modules/khmer/khmer-fc.c index 7d768c5e..75cebf87 100644 --- a/modules/khmer/khmer-fc.c +++ b/modules/khmer/khmer-fc.c @@ -522,25 +522,32 @@ khmer_engine_shape (PangoEngineShape *engine, PangoAnalysis *analysis, PangoGlyphString *glyphs) { - PangoFcFont *fc_font = PANGO_FC_FONT (font); + PangoFcFont *fc_font; FT_Face face; - PangoOTBuffer *buffer; PangoOTRuleset *ruleset; - glong n_chars, i; + PangoOTBuffer *buffer; + glong n_chars; gunichar *wcs; const char *p; + int i; glong syllable; KhmerCharClass charClass; glong cursor = 0; - buffer = pango_ot_buffer_new (fc_font); + g_return_if_fail (font != NULL); + g_return_if_fail (text != NULL); + g_return_if_fail (length >= 0); + g_return_if_fail (analysis != NULL); + fc_font = PANGO_FC_FONT (font); face = pango_fc_font_lock_face (fc_font); - g_assert (face); + g_return_if_fail (face != NULL); + + buffer = pango_ot_buffer_new (fc_font); wcs = g_utf8_to_ucs4_fast (text, length, &n_chars); - p = text; + p = text; /* This loop only exits when we reach the end of a run, which may contain * several syllables. */ |