summaryrefslogtreecommitdiff
path: root/modules/thai/thai-fc.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-07-31 19:55:21 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-07-31 19:55:21 +0000
commit40bc4991e51fc8c2fa70516bae6d36599431cb6a (patch)
treea8555c57f91c4037c2fa4d2a766a68b13801678c /modules/thai/thai-fc.c
parent9f790d57b0cea4fafc70a43acc7ee98b23f09f8d (diff)
downloadpango-40bc4991e51fc8c2fa70516bae6d36599431cb6a.tar.gz
Argument to make_glyph() shouldn't have been unsigned char, since we pass
Wed Jul 31 15:43:39 2002 Owen Taylor <otaylor@redhat.com> * modules/thai/{thai-shaper.h,thai-x.c,thai-xft.c}: Argument to make_glyph() shouldn't have been unsigned char, since we pass unicode through it. * modules/thai/thai-xft.c (make_glyph): Handle THAI_FONT_ISO10646 correctly. If a character isn't found, return the correct unknown glyph.
Diffstat (limited to 'modules/thai/thai-fc.c')
-rw-r--r--modules/thai/thai-fc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index 169aa66d..3a20a536 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -162,23 +162,28 @@ get_font_info (PangoFont *font)
}
PangoGlyph
-make_glyph (ThaiFontInfo *font_info, unsigned char c)
+make_glyph (ThaiFontInfo *font_info, unsigned int c)
{
int index;
+ PangoGlyph result;
switch (font_info->font_set) {
- case THAI_FONT_ISO10646:
+ case THAI_FONT_ISO10646:index = c; break;
case THAI_FONT_TIS: index = (c & 0x80) ? tis620_0[c & 0x7f] : c; break;
case THAI_FONT_TIS_MAC: index = (c & 0x80) ? tis620_1[c & 0x7f] : c; break;
case THAI_FONT_TIS_WIN: index = (c & 0x80) ? tis620_2[c & 0x7f] : c; break;
default: index = 0; break;
}
-
- return pango_xft_font_get_glyph (font_info->font, index);
+
+ result = pango_xft_font_get_glyph (font_info->font, index);
+ if (result)
+ return result;
+ else
+ return pango_xft_font_get_unknown_glyph (font_info->font, c);
}
PangoGlyph
-make_unknown_glyph (ThaiFontInfo *font_info, unsigned char c)
+make_unknown_glyph (ThaiFontInfo *font_info, unsigned int c)
{
return pango_xft_font_get_unknown_glyph (font_info->font, c);
}