summaryrefslogtreecommitdiff
path: root/modules/hebrew
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hebrew')
-rw-r--r--modules/hebrew/hebrew-fc.c23
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);