From b69818278ed747d0c1642231bb99ba99e89d9ce5 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 31 Jul 2002 19:59:28 +0000 Subject: Argument to make_glyph() shouldn't have been unsigned char, since we pass Wed Jul 31 15:43:39 2002 Owen Taylor * 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. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-1-10 | 10 ++++++++++ ChangeLog.pre-1-2 | 10 ++++++++++ ChangeLog.pre-1-4 | 10 ++++++++++ ChangeLog.pre-1-6 | 10 ++++++++++ ChangeLog.pre-1-8 | 10 ++++++++++ modules/thai/thai-fc.c | 15 ++++++++------- modules/thai/thai-shaper.h | 4 ++-- modules/thai/thai-x.c | 4 ++-- modules/thai/thai-xft.c | 15 ++++++++------- 10 files changed, 80 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 922123d5..2c0a4312 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Jul 31 15:43:39 2002 Owen Taylor + + * 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. + Wed Jul 31 12:38:36 2002 Owen Taylor * pango/querymodules.c (string_needs_escape): Avoid diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 922123d5..2c0a4312 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,13 @@ +Wed Jul 31 15:43:39 2002 Owen Taylor + + * 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. + Wed Jul 31 12:38:36 2002 Owen Taylor * pango/querymodules.c (string_needs_escape): Avoid diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 922123d5..2c0a4312 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,13 @@ +Wed Jul 31 15:43:39 2002 Owen Taylor + + * 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. + Wed Jul 31 12:38:36 2002 Owen Taylor * pango/querymodules.c (string_needs_escape): Avoid diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 922123d5..2c0a4312 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,13 @@ +Wed Jul 31 15:43:39 2002 Owen Taylor + + * 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. + Wed Jul 31 12:38:36 2002 Owen Taylor * pango/querymodules.c (string_needs_escape): Avoid diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 922123d5..2c0a4312 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,13 @@ +Wed Jul 31 15:43:39 2002 Owen Taylor + + * 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. + Wed Jul 31 12:38:36 2002 Owen Taylor * pango/querymodules.c (string_needs_escape): Avoid diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 922123d5..2c0a4312 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,13 @@ +Wed Jul 31 15:43:39 2002 Owen Taylor + + * 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. + Wed Jul 31 12:38:36 2002 Owen Taylor * pango/querymodules.c (string_needs_escape): Avoid diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c index 11fd7bff..4e23306f 100644 --- a/modules/thai/thai-fc.c +++ b/modules/thai/thai-fc.c @@ -170,27 +170,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; } - index = FT_Get_Char_Index (font_info->info.face, index); - if (index && index <= ((FT_Face) font_info->info.face)->num_glyphs) - return index; + result = FT_Get_Char_Index (font_info->info.face, index); + if (result && result <= ((FT_Face) font_info->info.face)->num_glyphs) + return result; else - return 0; + return pango_xft_font_get_unknown_glyph (font_info->font, index); } 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); } diff --git a/modules/thai/thai-shaper.h b/modules/thai/thai-shaper.h index f4e67917..8bd00a3f 100644 --- a/modules/thai/thai-shaper.h +++ b/modules/thai/thai-shaper.h @@ -42,10 +42,10 @@ ThaiFontInfo * get_font_info (PangoFont *font); PangoGlyph -make_glyph (ThaiFontInfo *font_info, unsigned char c); +make_glyph (ThaiFontInfo *font_info, unsigned int c); PangoGlyph -make_unknown_glyph (ThaiFontInfo *font_info, unsigned char c); +make_unknown_glyph (ThaiFontInfo *font_info, unsigned int c); /* * Public functions diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c index f2c96337..53423f52 100644 --- a/modules/thai/thai-x.c +++ b/modules/thai/thai-x.c @@ -127,13 +127,13 @@ get_font_info (PangoFont *font) } PangoGlyph -make_glyph (ThaiFontInfo *font_info, unsigned char c) +make_glyph (ThaiFontInfo *font_info, unsigned int c) { return PANGO_X_MAKE_GLYPH (font_info->info.subfont, c); } PangoGlyph -make_unknown_glyph (ThaiFontInfo *font_info, unsigned char c) +make_unknown_glyph (ThaiFontInfo *font_info, unsigned int c) { return pango_x_get_unknown_glyph (font_info->font); } diff --git a/modules/thai/thai-xft.c b/modules/thai/thai-xft.c index 11fd7bff..4e23306f 100644 --- a/modules/thai/thai-xft.c +++ b/modules/thai/thai-xft.c @@ -170,27 +170,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; } - index = FT_Get_Char_Index (font_info->info.face, index); - if (index && index <= ((FT_Face) font_info->info.face)->num_glyphs) - return index; + result = FT_Get_Char_Index (font_info->info.face, index); + if (result && result <= ((FT_Face) font_info->info.face)->num_glyphs) + return result; else - return 0; + return pango_xft_font_get_unknown_glyph (font_info->font, index); } 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); } -- cgit v1.2.1