summaryrefslogtreecommitdiff
path: root/modules/thai
diff options
context:
space:
mode:
authorChookij Vanatham <chookij@src.gnome.org>2001-05-07 23:23:25 +0000
committerChookij Vanatham <chookij@src.gnome.org>2001-05-07 23:23:25 +0000
commit819be6d975faa089c5551e6822267ca8e42ac224 (patch)
tree1aa0a489bad3b3d8a8a211a31fa7178d754e9580 /modules/thai
parenta9e84d4f9560fea6c01e9639561a72e2ed246fce (diff)
downloadpango-819be6d975faa089c5551e6822267ca8e42ac224.tar.gz
Added 0x20 glyph for spacing vowel/tonemark support for tis620-0.
Diffstat (limited to 'modules/thai')
-rw-r--r--modules/thai/thai-x.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c
index 1970fb36..0fa21585 100644
--- a/modules/thai/thai-x.c
+++ b/modules/thai/thai-x.c
@@ -294,6 +294,17 @@ typedef struct {
#define shiftdown_bv_bd(c,tbl) ((tbl)->ShiftDown_BV_BD[(c)-0xD8])
#define tailcutcons(c,tbl) ((tbl)->TailCutCons[(c)-0xAD])
+/* No adjusted vowel/tonemark glyphs (tis620-0)
+ */
+static const ThaiShapeTable tis620_0_shape_table = {
+ { 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE },
+ { 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE },
+ { 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE },
+ { 0xD1, 0x00, 0x00, 0xD4, 0xD5, 0xD6, 0xD7 },
+ { 0xD8, 0xD9, 0xDA },
+ { 0xAD, 0x00, 0x00, 0xB0 }
+};
+
/* Macintosh
*/
static const ThaiShapeTable Mac_shape_table = {
@@ -453,10 +464,13 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
case 1:
if (is_char_type (cluster[0], BelowVowel|BelowDiac|AboveVowel|AboveDiac|Tone))
{
- glyph_lists[0] = PANGO_X_MAKE_GLYPH (font_info->subfont, 0x7F);
+ if (font_info->type == THAI_FONT_TIS)
+ glyph_lists[0] = PANGO_X_MAKE_GLYPH (font_info->subfont, 0x20);
+ else
+ glyph_lists[0] = PANGO_X_MAKE_GLYPH (font_info->subfont, 0x7F);
glyph_lists[1] =
PANGO_X_MAKE_GLYPH (font_info->subfont, ucs2tis (cluster[0]));
- return 2;
+ return 2;
}
else
{
@@ -552,8 +566,10 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
}
else
{
- glyph_lists[0] =
- PANGO_X_MAKE_GLYPH (font_info->subfont, 0x7F);
+ if (font_info->type == THAI_FONT_TIS)
+ glyph_lists[0] = PANGO_X_MAKE_GLYPH (font_info->subfont, 0x20);
+ else
+ glyph_lists[0] = PANGO_X_MAKE_GLYPH (font_info->subfont, 0x7F);
glyph_lists[1] =
PANGO_X_MAKE_GLYPH (font_info->subfont, ucs2tis (cluster[0]));
glyph_lists[2] =
@@ -703,9 +719,10 @@ get_glyphs_list (ThaiFontInfo *font_info,
return num_chrs;
case THAI_FONT_TIS:
- for (i=0; i < num_chrs; i++)
- glyph_lists[i] =
- PANGO_X_MAKE_GLYPH (font_info->subfont, ucs2tis (cluster[i]));
+ /* TIS620-0 + Wtt2.0 Extension
+ */
+ return get_adjusted_glyphs_list (font_info, cluster,
+ num_chrs, glyph_lists, &tis620_0_shape_table);
return num_chrs;
case THAI_FONT_TIS_MAC: