summaryrefslogtreecommitdiff
path: root/pango/pango-engine.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-01-29 20:58:40 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-01-29 20:58:40 +0000
commit5b06b8379c5eba25be9f9057750a5bfe30f22ffe (patch)
tree4ecc86d176a1bf1a396e1647735dd1a682ed494b /pango/pango-engine.c
parent3ca03a79715e0002d99f0e7bd320a7b6b644ff21 (diff)
downloadpango-5b06b8379c5eba25be9f9057750a5bfe30f22ffe.tar.gz
Do not crash if the (win32 typically) shaper fails. Bug #304702:
2006-01-29 Behdad Esfahbod <behdad@gnome.org> Do not crash if the (win32 typically) shaper fails. Bug #304702: * pango/pango-engine.c (_pango_engine_shape_shape): Set num_glyphs to zero if failing. * pango/pango-shape.c (pango_shape): Instead of crashing if the shaper failed to produce any glyphs, print out a warning message containing the name of the font, and mark the font such that we don't keep printing warning for the same font.
Diffstat (limited to 'pango/pango-engine.c')
-rw-r--r--pango/pango-engine.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index 7517679d..4179119f 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -66,6 +66,8 @@ _pango_engine_shape_shape (PangoEngineShape *engine,
PangoAnalysis *analysis,
PangoGlyphString *glyphs)
{
+ glyphs->num_glyphs = 0;
+
g_return_if_fail (PANGO_IS_ENGINE_SHAPE (engine));
g_return_if_fail (PANGO_IS_FONT (font));
g_return_if_fail (text != NULL);