diff options
author | Changwoo Ryu <cwryu@debian.org> | 2005-04-24 16:32:57 +0000 |
---|---|---|
committer | Changwoo Ryu <cwryu@src.gnome.org> | 2005-04-24 16:32:57 +0000 |
commit | b818431d079e3a7d2f549ac84270acec397c462f (patch) | |
tree | bdeb5740466cf7e6230fe16ac21884e654ad7441 /modules/hangul | |
parent | f0b89739f8161df2c19afd061f7eb8f9a522c92c (diff) | |
download | pango-b818431d079e3a7d2f549ac84270acec397c462f.tar.gz |
handles zero width chars, patch by Young-Ho Cha. (#157565)
2005-04-25 Changwoo Ryu <cwryu@debian.org>
* modules/hangul/hangul-fc.c (render_basic): handles zero width
chars, patch by Young-Ho Cha. (#157565)
Diffstat (limited to 'modules/hangul')
-rw-r--r-- | modules/hangul/hangul-fc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c index f7f5557b..75dfa7c9 100644 --- a/modules/hangul/hangul-fc.c +++ b/modules/hangul/hangul-fc.c @@ -275,6 +275,10 @@ render_syllable (PangoFont *font, gunichar *text, int length, render_tone(font, tone, glyphs, n_glyphs, cluster_offset); } +/* stolen from basic module */ +#define ZERO_WIDTH_CHAR(wc)\ +(((wc) >= 0x200B && (wc) <= 0x200F) || ((wc) >= 0x202A && (wc) <= 0x202E) || ((wc) == 0xFEFF)) + static void render_basic (PangoFont *font, gunichar wc, PangoGlyphString *glyphs, int *n_glyphs, int cluster_offset) @@ -288,9 +292,14 @@ render_basic (PangoFont *font, gunichar wc, pango_glyph_string_set_size (glyphs, *n_glyphs + 1); if (index) set_glyph (font, glyphs, *n_glyphs, cluster_offset, index); - else - set_glyph (font, glyphs, *n_glyphs, cluster_offset, - get_unknown_glyph (font, wc)); + else + { + if (ZERO_WIDTH_CHAR (wc)) + set_glyph (font, glyphs, *n_glyphs, cluster_offset, 0); + else + set_glyph (font, glyphs, *n_glyphs, cluster_offset, + get_unknown_glyph (font, wc)); + } (*n_glyphs)++; } |