summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangwoo Ryu <cwryu@debian.org>2007-01-03 18:56:01 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-01-03 18:56:01 +0000
commitcbf5f1e8a747ce6b9d6a0b03a7febd6c6c55b0ca (patch)
tree42c3cd328c9df340948a925fef144a795e9d871d
parent669fd831cd13a57de85619a1a70aad38ac561022 (diff)
downloadpango-cbf5f1e8a747ce6b9d6a0b03a7febd6c6c55b0ca.tar.gz
Bug 388702 - Crash when there's no Hangul glyph in the font.
2007-01-03 Changwoo Ryu <cwryu@debian.org> Bug 388702 - Crash when there's no Hangul glyph in the font. * modules/hangul/hangul-fc.c (render_syllable): Do not try to render unknown syllable glyphs as jamos. * modules/hangul/hangul-fc.c (hangul_engine_shape): Check if the remaining string is a syllable. Bug 388581 - Every last Hangul syllable is decomposed to jamos. * modules/hangul/hangul-fc.c (hangul_engine_shape): Check if the remaining string is a syllable. svn path=/trunk/; revision=2125
-rw-r--r--ChangeLog15
-rw-r--r--modules/hangul/hangul-fc.c12
2 files changed, 26 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a40d2d8..9bfa1237 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2007-01-03 Changwoo Ryu <cwryu@debian.org>
+
+ Bug 388702 - Crash when there's no Hangul glyph in the font.
+
+ * modules/hangul/hangul-fc.c (render_syllable): Do not try to
+ render unknown syllable glyphs as jamos.
+
+ * modules/hangul/hangul-fc.c (hangul_engine_shape): Check if the
+ remaining string is a syllable.
+
+ Bug 388581 - Every last Hangul syllable is decomposed to jamos.
+
+ * modules/hangul/hangul-fc.c (hangul_engine_shape): Check if the
+ remaining string is a syllable.
+
2007-01-03 Behdad Esfahbod <behdad@gnome.org>
Bug 390877 – Don't feed pango-features.h to glib-mkenums
diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c
index 9828ef8f..4b218bdb 100644
--- a/modules/hangul/hangul-fc.c
+++ b/modules/hangul/hangul-fc.c
@@ -323,6 +323,14 @@ render_syllable (PangoFont *font, const char *str, int length,
(*n_glyphs)++;
continue;
}
+ else if (IS_S(wc))
+ {
+ pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
+ set_glyph (font, glyphs, *n_glyphs, cluster_offset,
+ PANGO_GET_UNKNOWN_GLYPH (wc));
+ (*n_glyphs)++;
+ continue;
+ }
/* This font has no glyphs on the Hangul Jamo area! Find a
fallback from the Hangul Compatibility Jamo area. */
@@ -445,7 +453,9 @@ hangul_engine_shape (PangoEngineShape *engine,
p = g_utf8_next_char (p);
}
- if (n_jamos > 0)
+ if (n_jamos == 1 && IS_S (prev))
+ render_basic (font, prev, glyphs, &n_glyphs, start - text);
+ else if (n_jamos > 0)
render_syllable (font, start, n_jamos, glyphs, &n_glyphs,
start - text);
}