summaryrefslogtreecommitdiff
path: root/modules/thai
diff options
context:
space:
mode:
Diffstat (limited to 'modules/thai')
-rw-r--r--modules/thai/thai-charprop.c124
-rw-r--r--modules/thai/thai-fc.c16
-rw-r--r--modules/thai/thai-lang.c22
-rw-r--r--modules/thai/thai-ot.c94
-rw-r--r--modules/thai/thai-ot.h2
-rw-r--r--modules/thai/thai-shaper.c138
-rw-r--r--modules/thai/thai-shaper.h8
7 files changed, 202 insertions, 202 deletions
diff --git a/modules/thai/thai-charprop.c b/modules/thai/thai-charprop.c
index a05592b5..26e13318 100644
--- a/modules/thai/thai-charprop.c
+++ b/modules/thai/thai-charprop.c
@@ -28,92 +28,92 @@
const gshort thai_char_type[256] = {
/* 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, A, B, C, D, E, F */
+ 8, 9, A, B, C, D, E, F */
- /* CL1 */
+ /* CL1 */
/*00*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
+ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
/*10*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
+ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- /* Lao zone: [U+0E80..U+0EDF] */
+ /* Lao zone: [U+0E80..U+0EDF] */
/*20*/ _ND, _NC, _NC, _ND, _NC, _ND, _ND, _NC,
- _NC, _ND, _NC, _ND, _ND, _NC, _ND, _ND,
+ _NC, _ND, _NC, _ND, _ND, _NC, _ND, _ND,
/*30*/ _ND, _ND, _ND, _ND, _NC, _NC, _NC, _NC,
- _ND, _NC, _NC, _UC, _NC, _UC, _NC, _UC,
+ _ND, _NC, _NC, _UC, _NC, _UC, _NC, _UC,
/*40*/ _ND, _NC, _UC, _NC, _ND, _NC, _ND, _NC,
- _ND, _ND, _NC, _NC, _ND, _NC, _NC, _ND,
+ _ND, _ND, _NC, _NC, _ND, _NC, _NC, _ND,
/*50*/ _ND, _AV, _ND, _AM, _AV, _AV, _AV, _AV,
- _BV, _BV, _ND, _AV, _BD, _NC, _ND, _ND,
+ _BV, _BV, _ND, _AV, _BD, _NC, _ND, _ND,
/*60*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _AD,
- _TN, _TN, _TN, _TN, _AD, _AD, _ND, _ND,
+ _TN, _TN, _TN, _TN, _AD, _AD, _ND, _ND,
/*70*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- _ND, _ND, _ND, _ND, _NC, _NC, _ND, _ND,
+ _ND, _ND, _ND, _ND, _NC, _NC, _ND, _ND,
- /* CL2 */
+ /* CL2 */
/*80*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
+ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
/*90*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
+ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- /* Thai zone: [U+0E00..U+0E5F] */
+ /* Thai zone: [U+0E00..U+0E5F] */
/*A0*/ _ND, _NC, _NC, _NC, _NC, _NC, _NC, _NC,
- _NC, _NC, _NC, _NC, _NC, _SC, _BC, _BC,
+ _NC, _NC, _NC, _NC, _NC, _SC, _BC, _BC,
/*B0*/ _SC, _NC, _NC, _NC, _NC, _NC, _NC, _NC,
- _NC, _NC, _NC, _UC, _NC, _UC, _NC, _UC,
+ _NC, _NC, _NC, _UC, _NC, _UC, _NC, _UC,
/*C0*/ _NC, _NC, _NC, _NC, _ND, _NC, _ND, _NC,
- _NC, _NC, _NC, _NC, _UC, _NC, _NC, _ND,
+ _NC, _NC, _NC, _NC, _UC, _NC, _NC, _ND,
/*D0*/ _ND, _AV, _ND, _AM, _AV, _AV, _AV, _AV,
- _BV, _BV, _BD, _ND, _ND, _ND, _ND, _ND,
+ _BV, _BV, _BD, _ND, _ND, _ND, _ND, _ND,
/*E0*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _AD,
- _TN, _TN, _TN, _TN, _AD, _AD, _AD, _ND,
+ _TN, _TN, _TN, _TN, _AD, _AD, _AD, _ND,
/*F0*/ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
- _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
+ _ND, _ND, _ND, _ND, _ND, _ND, _ND, _ND,
};
const gshort thai_TAC_char_class[256] = {
/* 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, A, B, C, D, E, F */
+ 8, 9, A, B, C, D, E, F */
- /* CL1 */
+ /* CL1 */
/*00*/ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
- CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
+ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
/*10*/ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
- CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
+ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
- /* Lao zone: [U+0E80..U+0EDF] */
+ /* Lao zone: [U+0E80..U+0EDF] */
/*20*/ NON,CONS,CONS, NON,CONS, NON, NON,CONS,
- CONS, NON,CONS, NON, NON,CONS, NON, NON,
+ CONS, NON,CONS, NON, NON,CONS, NON, NON,
/*30*/ NON, NON, NON, NON,CONS,CONS,CONS,CONS,
- NON,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
+ NON,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
/*40*/ NON,CONS,CONS,CONS, NON,CONS, NON,CONS,
- NON, NON,CONS,CONS, NON,CONS,CONS, NON,
+ NON, NON,CONS,CONS, NON,CONS,CONS, NON,
/*50*/ FV1, AV2, FV1, AM, AV1, AV3, AV2, AV3,
- BV1, BV2, NON, AV2,BCON, FV3, NON, NON,
+ BV1, BV2, NON, AV2,BCON, FV3, NON, NON,
/*60*/ LV, LV, LV, LV, LV, NON, NON, NON,
- TONE,TONE,TONE,TONE, AD1, AD4, NON, NON,
+ TONE,TONE,TONE,TONE, AD1, AD4, NON, NON,
/*70*/ NON, NON, NON, NON, NON, NON, NON, NON,
- NON, NON, NON, NON,CONS,CONS, NON,CTRL,
+ NON, NON, NON, NON,CONS,CONS, NON,CTRL,
- /* CL2 */
+ /* CL2 */
/*80*/ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
- CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
+ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
/*90*/ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
- CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
+ CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,CTRL,
- /* Thai zone: [U+0E00..U+0E5F] */
+ /* Thai zone: [U+0E00..U+0E5F] */
/*A0*/ NON,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
- CONS,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
+ CONS,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
/*B0*/ CONS,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
- CONS,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
+ CONS,CONS,CONS,CONS,CONS,CONS,CONS,CONS,
/*C0*/ CONS,CONS,CONS,CONS, FV3,CONS, FV3,CONS,
- CONS,CONS,CONS,CONS,CONS,CONS,CONS, NON,
+ CONS,CONS,CONS,CONS,CONS,CONS,CONS, NON,
/*D0*/ FV1, AV2, FV1, AM, AV1, AV3, AV2, AV3,
- BV1, BV2, BD, NON, NON, NON, NON, NON,
+ BV1, BV2, BD, NON, NON, NON, NON, NON,
/*E0*/ LV, LV, LV, LV, LV, FV2, NON, AD2,
- TONE,TONE,TONE,TONE, AD1, AD4, AD3, NON,
+ TONE,TONE,TONE,TONE, AD1, AD4, AD3, NON,
/*F0*/ NON, NON, NON, NON, NON, NON, NON, NON,
- NON, NON, NON, NON, NON, NON, NON,CTRL,
+ NON, NON, NON, NON, NON, NON, NON,CTRL,
};
const gchar thai_TAC_compose_input[20][20] = {
@@ -121,44 +121,44 @@ const gchar thai_TAC_compose_input[20][20] = {
/*CTRL NON CONS LV FV1 FV2 FV3 AM BV1 BV2
* BD TONE AD1 AD2 AD3 AD4 AV1 AV2 AV3 BCON*/
/*CTRL*/{'X','A','A','A','A','A','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*NON */{'X','A','A','A','S','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*CONS*/{'X','A','A','A','A','S','A','C','C','C',
- 'C','C','C','C','C','C','C','C','C','C'},
+ 'C','C','C','C','C','C','C','C','C','C'},
/*LV */{'X','S','A','S','S','S','S','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*FV1 */{'X','A','A','A','A','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*FV2 */{'X','A','A','A','A','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*FV3 */{'X','A','A','A','S','A','S','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*AM */{'X','A','A','A','S','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*BV1 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','C','C','R','R','C','R','R','R','R'},
+ 'R','C','C','R','R','C','R','R','R','R'},
/*BV2 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','C','R','R','R','R','R','R','R','R'},
+ 'R','C','R','R','R','R','R','R','R','R'},
/*BD */{'X','A','A','A','S','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*TONE*/{'X','A','A','A','A','A','A','C','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*AD1 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*AD2 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*AD3 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','R','R','R','R','R','R','R','R','R'},
+ 'R','R','R','R','R','R','R','R','R','R'},
/*AD4 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','C','R','R','R','R','R','R','R','R'},
+ 'R','C','R','R','R','R','R','R','R','R'},
/*AV1 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','C','C','R','R','C','R','R','R','R'},
+ 'R','C','C','R','R','C','R','R','R','R'},
/*AV2 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','C','R','R','R','R','R','R','R','R'},
+ 'R','C','R','R','R','R','R','R','R','R'},
/*AV3 */{'X','A','A','A','S','S','A','R','R','R',
- 'R','C','R','C','R','R','R','R','R','R'},
+ 'R','C','R','C','R','R','R','R','R','R'},
/*BCON*/{'X','A','A','A','A','S','A','C','C','C',
- 'R','C','R','R','R','C','C','C','C','R'},
+ 'R','C','R','R','R','C','C','C','C','R'},
};
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index ebb2e97a..40ba8842 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -126,7 +126,7 @@ static const int lao_0[128] = {
/**/ 0, 0, 0, 0, 0, 0, 0, 0,
0x0020, 0x0e81, 0x0e82, 0, 0x0e84, 0, 0, 0x0e87,
0x0e88, 0, 0x0e8a, 0, 0, 0x0e8d, 0, 0,
- 0, 0, 0, 0, 0x0e94, 0x0e95, 0x0e96, 0x0e97,
+ 0, 0, 0, 0, 0x0e94, 0x0e95, 0x0e96, 0x0e97,
/**/ 0, 0x0e99, 0x0e9a, 0x0e9b, 0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f,
/**/ 0, 0x0ea1, 0x0ea2, 0x0ea3, 0, 0x0ea5, 0, 0x0ea7,
/**/ 0, 0, 0x0eaa, 0x0eab, 0, 0x0ead, 0x0eae, 0x0eaf,
@@ -146,10 +146,10 @@ contain_glyphs(PangoFont *font, const int glyph_map[128])
for (c = 0; c < 0x80; c++)
{
if (glyph_map[c])
- {
+ {
if (!pango_fc_font_has_char (fc_font, glyph_map[c]))
- return 0;
- }
+ return 0;
+ }
}
return 1;
}
@@ -175,13 +175,13 @@ thai_get_font_info (PangoFont *font)
/* detect font set by determining availibility of OT ruleset & glyphs */
if (thai_ot_get_ruleset (font))
- font_info->font_set = THAI_FONT_TIS;
+ font_info->font_set = THAI_FONT_TIS;
else if (contain_glyphs(font, tis620_2))
- font_info->font_set = THAI_FONT_TIS_WIN;
+ font_info->font_set = THAI_FONT_TIS_WIN;
else if (contain_glyphs(font, tis620_1))
- font_info->font_set = THAI_FONT_TIS_MAC;
+ font_info->font_set = THAI_FONT_TIS_MAC;
else
- font_info->font_set = THAI_FONT_TIS;
+ font_info->font_set = THAI_FONT_TIS;
g_object_set_qdata_full (G_OBJECT (font), info_id, font_info, (GDestroyNotify)g_free);
}
diff --git a/modules/thai/thai-lang.c b/modules/thai/thai-lang.c
index a6fe45c4..83d16428 100644
--- a/modules/thai/thai-lang.c
+++ b/modules/thai/thai-lang.c
@@ -69,11 +69,11 @@ utf8_to_tis (const char *text, int len)
static void
thai_engine_break (PangoEngineLang *engine,
- const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs,
- int attrs_len)
+ const char *text,
+ int len,
+ PangoAnalysis *analysis,
+ PangoLogAttr *attrs,
+ int attrs_len)
{
thchar_t *tis_text;
@@ -88,11 +88,11 @@ thai_engine_break (PangoEngineLang *engine,
/* find line break positions */
brk_n = th_brk (tis_text, brk_pnts, brk_len);
for (i = 0; i < brk_n; i++)
- {
- attrs[brk_pnts[i]].is_line_break = TRUE;
- attrs[brk_pnts[i]].is_word_start = TRUE;
- attrs[brk_pnts[i]].is_word_end = TRUE;
- }
+ {
+ attrs[brk_pnts[i]].is_line_break = TRUE;
+ attrs[brk_pnts[i]].is_word_start = TRUE;
+ attrs[brk_pnts[i]].is_word_end = TRUE;
+ }
g_free (brk_pnts);
g_free (tis_text);
@@ -106,7 +106,7 @@ thai_engine_lang_class_init (PangoEngineLangClass *class)
}
PANGO_ENGINE_LANG_DEFINE_TYPE (ThaiEngineLang, thai_engine_lang,
- thai_engine_lang_class_init, NULL);
+ thai_engine_lang_class_init, NULL);
void
PANGO_MODULE_ENTRY(init) (GTypeModule *module)
diff --git a/modules/thai/thai-ot.c b/modules/thai/thai-ot.c
index 66c129c4..b6866321 100644
--- a/modules/thai/thai-ot.c
+++ b/modules/thai/thai-ot.c
@@ -47,7 +47,7 @@ maybe_add_gsub_feature (PangoOTRuleset *ruleset,
static gint
maybe_add_gpos_feature (PangoOTRuleset *ruleset,
- PangoOTInfo *info,
+ PangoOTInfo *info,
guint script_index,
PangoOTTag feature_tag,
gulong property_bit)
@@ -85,51 +85,51 @@ thai_ot_get_ruleset (PangoFont *font)
static GQuark ruleset_quark = 0;
if (!ruleset_quark)
- ruleset_quark = g_quark_from_string ("thai-ot-ruleset");
+ ruleset_quark = g_quark_from_string ("thai-ot-ruleset");
ruleset = g_object_get_qdata (G_OBJECT (info), ruleset_quark);
if (!ruleset)
- {
- PangoOTTag thai_tag = FT_MAKE_TAG ('t', 'h', 'a', 'i');
- guint script_index;
- gint n = 0;
+ {
+ PangoOTTag thai_tag = FT_MAKE_TAG ('t', 'h', 'a', 'i');
+ guint script_index;
+ gint n = 0;
- ruleset = pango_ot_ruleset_new (info);
+ ruleset = pango_ot_ruleset_new (info);
- if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GSUB,
- thai_tag, &script_index))
+ if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GSUB,
+ thai_tag, &script_index))
{
n += maybe_add_gsub_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('c','c','m','p'),
+ FT_MAKE_TAG ('c','c','m','p'),
0xFFFF);
n += maybe_add_gsub_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('l','i','g','a'),
+ FT_MAKE_TAG ('l','i','g','a'),
0xFFFF);
}
- if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS,
- thai_tag, &script_index))
+ if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS,
+ thai_tag, &script_index))
{
n += maybe_add_gpos_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('k','e','r','n'),
+ FT_MAKE_TAG ('k','e','r','n'),
0xFFFF);
n += maybe_add_gpos_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('m','a','r','k'),
+ FT_MAKE_TAG ('m','a','r','k'),
0xFFFF);
n += maybe_add_gpos_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('m','k','m','k'),
+ FT_MAKE_TAG ('m','k','m','k'),
0xFFFF);
}
if (n > 0)
- g_object_set_qdata_full (G_OBJECT (info), ruleset_quark, ruleset,
+ g_object_set_qdata_full (G_OBJECT (info), ruleset_quark, ruleset,
(GDestroyNotify)g_object_unref);
else
{
g_object_unref (ruleset);
ruleset = NULL;
}
- }
+ }
}
pango_fc_font_unlock_face (fc_font);
@@ -158,51 +158,51 @@ lao_ot_get_ruleset (PangoFont *font)
static GQuark ruleset_quark = 0;
if (!ruleset_quark)
- ruleset_quark = g_quark_from_string ("lao-ot-ruleset");
+ ruleset_quark = g_quark_from_string ("lao-ot-ruleset");
ruleset = g_object_get_qdata (G_OBJECT (info), ruleset_quark);
if (!ruleset)
- {
- PangoOTTag thai_tag = FT_MAKE_TAG ('l', 'a', 'o', ' ');
- guint script_index;
- gint n = 0;
+ {
+ PangoOTTag thai_tag = FT_MAKE_TAG ('l', 'a', 'o', ' ');
+ guint script_index;
+ gint n = 0;
- ruleset = pango_ot_ruleset_new (info);
+ ruleset = pango_ot_ruleset_new (info);
- if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GSUB,
- thai_tag, &script_index))
+ if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GSUB,
+ thai_tag, &script_index))
{
n += maybe_add_gsub_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('c','c','m','p'),
+ FT_MAKE_TAG ('c','c','m','p'),
0xFFFF);
n += maybe_add_gsub_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('l','i','g','a'),
+ FT_MAKE_TAG ('l','i','g','a'),
0xFFFF);
}
- if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS,
- thai_tag, &script_index))
+ if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS,
+ thai_tag, &script_index))
{
n += maybe_add_gpos_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('k','e','r','n'),
+ FT_MAKE_TAG ('k','e','r','n'),
0xFFFF);
n += maybe_add_gpos_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('m','a','r','k'),
+ FT_MAKE_TAG ('m','a','r','k'),
0xFFFF);
n += maybe_add_gpos_feature (ruleset, info, script_index,
- FT_MAKE_TAG ('m','k','m','k'),
+ FT_MAKE_TAG ('m','k','m','k'),
0xFFFF);
}
if (n > 0)
- g_object_set_qdata_full (G_OBJECT (info), ruleset_quark, ruleset,
+ g_object_set_qdata_full (G_OBJECT (info), ruleset_quark, ruleset,
(GDestroyNotify)g_object_unref);
else
{
g_object_unref (ruleset);
ruleset = NULL;
}
- }
+ }
}
pango_fc_font_unlock_face (fc_font);
@@ -213,7 +213,7 @@ lao_ot_get_ruleset (PangoFont *font)
void
thai_ot_shape (PangoFont *font,
- PangoGlyphString *glyphs)
+ PangoGlyphString *glyphs)
{
PangoOTRuleset *th_ruleset;
PangoOTRuleset *lo_ruleset;
@@ -229,23 +229,23 @@ thai_ot_shape (PangoFont *font,
/* prepare ot buffer */
buffer = pango_ot_buffer_new (PANGO_FC_FONT (font));
for (i = 0; i < glyphs->num_glyphs; i++)
- {
- pango_ot_buffer_add_glyph (buffer,
+ {
+ pango_ot_buffer_add_glyph (buffer,
glyphs->glyphs[i].glyph,
0,
glyphs->log_clusters[i]);
- }
+ }
if (th_ruleset != NULL)
- {
- pango_ot_ruleset_substitute (th_ruleset, buffer);
- pango_ot_ruleset_position (th_ruleset, buffer);
- }
+ {
+ pango_ot_ruleset_substitute (th_ruleset, buffer);
+ pango_ot_ruleset_position (th_ruleset, buffer);
+ }
if (lo_ruleset != NULL)
- {
- pango_ot_ruleset_substitute (lo_ruleset, buffer);
- pango_ot_ruleset_position (lo_ruleset, buffer);
- }
+ {
+ pango_ot_ruleset_substitute (lo_ruleset, buffer);
+ pango_ot_ruleset_position (lo_ruleset, buffer);
+ }
pango_ot_buffer_output (buffer, glyphs);
pango_ot_buffer_destroy (buffer);
diff --git a/modules/thai/thai-ot.h b/modules/thai/thai-ot.h
index de18bcdd..21f713c5 100644
--- a/modules/thai/thai-ot.h
+++ b/modules/thai/thai-ot.h
@@ -30,7 +30,7 @@ thai_ot_get_ruleset (PangoFont *font);
void
thai_ot_shape (PangoFont *font,
- PangoGlyphString *glyphs);
+ PangoGlyphString *glyphs);
#endif /* __THAI_OT_H__ */
diff --git a/modules/thai/thai-shaper.c b/modules/thai/thai-shaper.c
index df6c72f1..6d65a3b4 100644
--- a/modules/thai/thai-shaper.c
+++ b/modules/thai/thai-shaper.c
@@ -164,55 +164,55 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
switch (num_chrs)
{
case 1:
- if (is_char_type (cluster[0],
- BelowVowel|BelowDiac|AboveVowel|AboveDiac|Tone|SaraAm))
+ if (is_char_type (cluster[0],
+ BelowVowel|BelowDiac|AboveVowel|AboveDiac|Tone|SaraAm))
{
gint n;
glyph_lists[0] = get_null_base_glyph (font_info);
n = glyph_lists[0] ? 1 : 0;
- glyph_lists[n++] =
+ glyph_lists[n++] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
return n;
- }
+ }
else
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
- return 1;
- }
- break;
+ return 1;
+ }
+ break;
case 2:
- if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&
- is_char_type (cluster[1], SaraAm))
+ if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&
+ is_char_type (cluster[1], SaraAm))
{
- glyph_lists[0] =
+ glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
- glyph_lists[1] = thai_make_glyph_tis (font_info, shaping_table->AmComp[0]);
- glyph_lists[2] = thai_make_glyph_tis (font_info, shaping_table->AmComp[1]);
- return 3;
- }
+ glyph_lists[1] = thai_make_glyph_tis (font_info, shaping_table->AmComp[0]);
+ glyph_lists[2] = thai_make_glyph_tis (font_info, shaping_table->AmComp[1]);
+ return 3;
+ }
else if (is_char_type (cluster[0], UpTailCons) &&
- is_char_type (cluster[1], SaraAm))
+ is_char_type (cluster[1], SaraAm))
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
- glyph_lists[1] = thai_make_glyph_tis (font_info,
+ glyph_lists[1] = thai_make_glyph_tis (font_info,
shiftleft_tone_ad (shaping_table->AmComp[0], shaping_table));
- glyph_lists[2] = thai_make_glyph_tis (font_info, shaping_table->AmComp[1]);
- return 3;
- }
+ glyph_lists[2] = thai_make_glyph_tis (font_info, shaping_table->AmComp[1]);
+ return 3;
+ }
else if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&
- is_char_type (cluster[1], AboveVowel))
+ is_char_type (cluster[1], AboveVowel))
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
glyph_lists[1] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[1]));
return 2;
- }
+ }
else if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&
- is_char_type (cluster[1], AboveDiac|Tone))
+ is_char_type (cluster[1], AboveDiac|Tone))
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
@@ -221,16 +221,16 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
return 2;
}
else if (is_char_type (cluster[0], UpTailCons) &&
- is_char_type (cluster[1], AboveVowel))
+ is_char_type (cluster[1], AboveVowel))
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
glyph_lists[1] = thai_make_glyph_tis (font_info,
shiftleft_av (ucs2tis (cluster[1]), shaping_table));
return 2;
- }
+ }
else if (is_char_type (cluster[0], UpTailCons) &&
- is_char_type (cluster[1], AboveDiac|Tone))
+ is_char_type (cluster[1], AboveDiac|Tone))
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
@@ -239,14 +239,14 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
return 2;
}
else if (is_char_type (cluster[0], NoTailCons|UpTailCons) &&
- is_char_type (cluster[1], BelowVowel|BelowDiac))
+ is_char_type (cluster[1], BelowVowel|BelowDiac))
{
glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
glyph_lists[1] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[1]));
return 2;
- }
+ }
else if (is_char_type (cluster[0], BotTailCons) &&
is_char_type (cluster[1], BelowVowel|BelowDiac))
{
@@ -258,7 +258,7 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
return 2;
}
else if (is_char_type (cluster[0], SpltTailCons) &&
- is_char_type (cluster[1], BelowVowel|BelowDiac))
+ is_char_type (cluster[1], BelowVowel|BelowDiac))
{
glyph_lists[0] = thai_make_glyph_tis (font_info,
tailcutcons (ucs2tis (cluster[0]), shaping_table));
@@ -277,21 +277,21 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
thai_make_glyph_tis (font_info, ucs2tis (cluster[1]));
return n;
}
- break;
+ break;
case 3:
- if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&
- is_char_type (cluster[1], Tone) &&
- is_char_type (cluster[2], SaraAm))
+ if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&
+ is_char_type (cluster[1], Tone) &&
+ is_char_type (cluster[2], SaraAm))
{
- glyph_lists[0] =
+ glyph_lists[0] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[0]));
- glyph_lists[1] = thai_make_glyph_tis (font_info, shaping_table->AmComp[0]);
- glyph_lists[2] =
+ glyph_lists[1] = thai_make_glyph_tis (font_info, shaping_table->AmComp[0]);
+ glyph_lists[2] =
thai_make_glyph_tis (font_info, ucs2tis (cluster[1]));
- glyph_lists[3] = thai_make_glyph_tis (font_info, shaping_table->AmComp[1]);
- return 4;
- }
+ glyph_lists[3] = thai_make_glyph_tis (font_info, shaping_table->AmComp[1]);
+ return 4;
+ }
else if (is_char_type (cluster[0], UpTailCons) &&
is_char_type (cluster[1], Tone) &&
is_char_type (cluster[2], SaraAm))
@@ -379,12 +379,12 @@ get_adjusted_glyphs_list (ThaiFontInfo *font_info,
break;
default: /* e.g. Lao cluster with below cons + upper/lower vowel + tone */
- {
- gint i;
- for (i = 0; i < num_chrs; i++)
- glyph_lists[i] = thai_make_glyph_tis (font_info, ucs2tis (cluster[i]));
- return num_chrs;
- }
+ {
+ gint i;
+ for (i = 0; i < num_chrs; i++)
+ glyph_lists[i] = thai_make_glyph_tis (font_info, ucs2tis (cluster[i]));
+ return num_chrs;
+ }
}
return 0;
@@ -401,42 +401,42 @@ get_glyphs_list (ThaiFontInfo *font_info,
switch (pango_script_for_unichar (cluster[0]))
{
case PANGO_SCRIPT_THAI:
- switch (font_info->font_set)
- {
- default:
- case THAI_FONT_NONE:
- for (i=0; i < num_chrs; i++)
- glyph_lists[i] = thai_make_unknown_glyph (font_info, cluster[i]);
- return num_chrs;
-
- case THAI_FONT_TIS:
+ switch (font_info->font_set)
+ {
+ default:
+ case THAI_FONT_NONE:
+ for (i=0; i < num_chrs; i++)
+ glyph_lists[i] = thai_make_unknown_glyph (font_info, cluster[i]);
+ return num_chrs;
+
+ case THAI_FONT_TIS:
/* TIS620-0 + Wtt2.0 Extension
*/
- return get_adjusted_glyphs_list (font_info, cluster,
+ return get_adjusted_glyphs_list (font_info, cluster,
num_chrs, glyph_lists, &tis620_0_shape_table);
- case THAI_FONT_TIS_MAC:
+ case THAI_FONT_TIS_MAC:
/* MacIntosh Extension
*/
- return get_adjusted_glyphs_list (font_info, cluster,
+ return get_adjusted_glyphs_list (font_info, cluster,
num_chrs, glyph_lists, &Mac_shape_table);
- case THAI_FONT_TIS_WIN:
+ case THAI_FONT_TIS_WIN:
/* Microsoft Extension
*/
- return get_adjusted_glyphs_list (font_info, cluster,
+ return get_adjusted_glyphs_list (font_info, cluster,
num_chrs, glyph_lists, &Win_shape_table);
- }
+ }
break;
case PANGO_SCRIPT_LAO:
- return get_adjusted_glyphs_list (font_info, cluster,
- num_chrs, glyph_lists, &Lao_shape_table);
+ return get_adjusted_glyphs_list (font_info, cluster,
+ num_chrs, glyph_lists, &Lao_shape_table);
default:
- for (i=0; i < num_chrs; i++)
+ for (i=0; i < num_chrs; i++)
glyph_lists[i] = thai_make_unknown_glyph (font_info, cluster[i]);
- return num_chrs;
+ return num_chrs;
}
return 0; /* Quiet GCC */
@@ -485,10 +485,10 @@ is_wtt_composible (gunichar cur_wc, gunichar nxt_wc)
case 'S':
case 'R':
case 'X':
- return FALSE;
+ return FALSE;
case 'C':
- return TRUE;
+ return TRUE;
}
g_assert_not_reached ();
@@ -511,11 +511,11 @@ get_next_cluster(const char *text,
current = g_utf8_get_char (p);
cur_script = pango_script_for_unichar (current);
if (cluster_script == PANGO_SCRIPT_INVALID_CODE)
- cluster_script = cur_script;
+ cluster_script = cur_script;
if (cur_script != cluster_script ||
- (n_chars > 0 &&
- !is_wtt_composible (cluster[n_chars - 1], current)))
- break;
+ (n_chars > 0 &&
+ !is_wtt_composible (cluster[n_chars - 1], current)))
+ break;
cluster[n_chars++] = current;
}
diff --git a/modules/thai/thai-shaper.h b/modules/thai/thai-shaper.h
index 3349ed3b..ea3c4039 100644
--- a/modules/thai/thai-shaper.h
+++ b/modules/thai/thai-shaper.h
@@ -79,10 +79,10 @@ thai_make_unknown_glyph (ThaiFontInfo *font_info, gunichar uc);
void
thai_engine_shape (PangoEngineShape *engine,
PangoFont *font,
- const char *text,
- gint length,
- const PangoAnalysis *analysis,
- PangoGlyphString *glyphs);
+ const char *text,
+ gint length,
+ const PangoAnalysis *analysis,
+ PangoGlyphString *glyphs);
#endif /* __THAI_SHAPER_H__ */