diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-02-11 06:39:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-02-11 06:39:19 +0000 |
commit | 1b2e543aa5bc412062c97a9d37c4c5292604025f (patch) | |
tree | 27844df3e53bc4b3001cb36fc55b29ba4b568fdc /modules/hangul | |
parent | b1c021842d26d5674a51f802f29e2a8496767c55 (diff) | |
download | pango-1b2e543aa5bc412062c97a9d37c4c5292604025f.tar.gz |
Fix some runtime and compile-time warnings.
Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Fix some runtime and compile-time warnings.
* modules/hangul/hangul.c (hangul_engine_shape): Shape the
string with the unknown glyph rather than giving a warning
when the font doesn't have any of the necesary charsets.
Diffstat (limited to 'modules/hangul')
-rw-r--r-- | modules/hangul/hangul-x.c | 11 | ||||
-rw-r--r-- | modules/hangul/hangul.c | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/modules/hangul/hangul-x.c b/modules/hangul/hangul-x.c index 65e9faf3..8b07f115 100644 --- a/modules/hangul/hangul-x.c +++ b/modules/hangul/hangul-x.c @@ -604,7 +604,16 @@ hangul_engine_shape (PangoFont *font, if (!find_subfont (font, secondary_charset, G_N_ELEMENTS (secondary_charset), &subfont, &render_func)) if (!find_subfont (font, fallback_charsets, G_N_ELEMENTS (fallback_charsets), &subfont, &render_func)) { - g_warning ("No available Hangul fonts."); + PangoGlyph unknown_glyph = pango_x_get_unknown_glyph (font); + + n_chars = unicode_strlen (text, length); + pango_glyph_string_set_size (glyphs, n_chars); + + for (i=0; i<n_chars; i++) + set_glyph (glyphs, i, font, + PANGO_X_GLYPH_SUBFONT (unknown_glyph), + PANGO_X_GLYPH_INDEX (unknown_glyph)); + return; } diff --git a/modules/hangul/hangul.c b/modules/hangul/hangul.c index 65e9faf3..8b07f115 100644 --- a/modules/hangul/hangul.c +++ b/modules/hangul/hangul.c @@ -604,7 +604,16 @@ hangul_engine_shape (PangoFont *font, if (!find_subfont (font, secondary_charset, G_N_ELEMENTS (secondary_charset), &subfont, &render_func)) if (!find_subfont (font, fallback_charsets, G_N_ELEMENTS (fallback_charsets), &subfont, &render_func)) { - g_warning ("No available Hangul fonts."); + PangoGlyph unknown_glyph = pango_x_get_unknown_glyph (font); + + n_chars = unicode_strlen (text, length); + pango_glyph_string_set_size (glyphs, n_chars); + + for (i=0; i<n_chars; i++) + set_glyph (glyphs, i, font, + PANGO_X_GLYPH_SUBFONT (unknown_glyph), + PANGO_X_GLYPH_INDEX (unknown_glyph)); + return; } |