From b927529d336e6d55d539c446c2bc36bf1f56e55a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 12 Sep 2006 17:02:07 +0000 Subject: =?UTF-8?q?Bug=20355605=20=E2=80=93=20hexbox=20with=200000=20in=20?= =?UTF-8?q?it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-09-12 Behdad Esfahbod Bug 355605 – hexbox with 0000 in it * modules/hangul/hangul-fc.c (render_syllable): If decomposition fails, backup and add a single hexbox glyph for the original character. --- ChangeLog | 8 ++++++++ modules/hangul/hangul-fc.c | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94f257d2..be504936 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-09-12 Behdad Esfahbod + + Bug 355605 – hexbox with 0000 in it + + * modules/hangul/hangul-fc.c (render_syllable): If decomposition + fails, backup and add a single hexbox glyph for the original + character. + 2006-09-11 Behdad Esfahbod Bug 355435 – Invalid calls to pango_map_get_engine() diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c index 64966648..8b85c19a 100644 --- a/modules/hangul/hangul-fc.c +++ b/modules/hangul/hangul-fc.c @@ -231,6 +231,7 @@ render_syllable (PangoFont *font, gunichar *text, int length, for (i = 0; i < length; i++) { int jindex; + int oldlen; if (text[i] == LFILL || text[i] == VFILL) continue; @@ -247,14 +248,21 @@ render_syllable (PangoFont *font, gunichar *text, int length, /* This font has no glyphs on the Hangul Jamo area! Find a fallback from the Hangul Compatibility Jamo area. */ jindex = text[i] - LBASE; + oldlen = *n_glyphs; for (j = 0; j < 3 && (__jamo_to_ksc5601[jindex][j] != 0); j++) { wc = __jamo_to_ksc5601[jindex][j] - KSC_JAMOBASE + UNI_JAMOBASE; index = (wc >= 0x3131) ? find_char (font, wc) : 0; pango_glyph_string_set_size (glyphs, *n_glyphs + 1); if (!index) - set_glyph (font, glyphs, *n_glyphs, cluster_offset, - get_unknown_glyph (font, index)); + { + *n_glyphs = oldlen; + pango_glyph_string_set_size (glyphs, *n_glyphs + 1); + set_glyph (font, glyphs, *n_glyphs, cluster_offset, + get_unknown_glyph (font, text[i])); + (*n_glyphs)++; + break; + } else set_glyph (font, glyphs, *n_glyphs, cluster_offset, index); (*n_glyphs)++; -- cgit v1.2.1