diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2005-12-26 07:13:02 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2005-12-26 07:13:02 +0000 |
commit | 064ed86a45773b770c746073871b61c6c050a919 (patch) | |
tree | e68ccd1e58ffe6f71f177b200972e7a6ce37fd09 /modules/hebrew | |
parent | fe003b6f1f5f6966cc19ac490d9a00bf5cd7a77c (diff) | |
download | pango-064ed86a45773b770c746073871b61c6c050a919.tar.gz |
modules/arabic/arabic-fc.c, modules/basic/basic-fc.c,
2005-12-26 Behdad Esfahbod <behdad@gnome.org>
* modules/arabic/arabic-fc.c,
* modules/basic/basic-fc.c,
* modules/hebrew/hebrew-fc.c,
* modules/syriac/syriac-fc.c: Use pango_is_zero_width() to not draw
zero-width characters in the OpenType shapers. (Fixes bug #324621)
Diffstat (limited to 'modules/hebrew')
-rw-r--r-- | modules/hebrew/hebrew-fc.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c index 78b3cb9a..b2080db6 100644 --- a/modules/hebrew/hebrew-fc.c +++ b/modules/hebrew/hebrew-fc.c @@ -347,19 +347,26 @@ hebrew_engine_shape (PangoEngineShape *engine, input = buf; } - index = pango_fc_font_get_glyph (fc_font, wc); - - if (!index) + if (pango_is_zero_width (wc)) /* Zero-width characters */ { - pango_ot_buffer_add_glyph (buffer, pango_fc_font_get_unknown_glyph (fc_font, wc), - unknown_property, p - text); + pango_ot_buffer_add_glyph (buffer, 0, unknown_property, p - text); } else { - cluster = p - text; + index = pango_fc_font_get_glyph (fc_font, wc); - pango_ot_buffer_add_glyph (buffer, index, - unknown_property, cluster); + if (!index) + { + pango_ot_buffer_add_glyph (buffer, pango_fc_font_get_unknown_glyph (fc_font, wc), + unknown_property, p - text); + } + else + { + cluster = p - text; + + pango_ot_buffer_add_glyph (buffer, index, + unknown_property, cluster); + } } p = g_utf8_next_char (p); |