summaryrefslogtreecommitdiff
path: root/modules/thai/thai-fc.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/thai/thai-fc.c')
-rw-r--r--modules/thai/thai-fc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index e67c05c5..f2760aa2 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -34,6 +34,7 @@
#include "pangofc-font.h"
#include "thai-shaper.h"
+#include "thai-ot.h"
/* No extra fields needed */
typedef PangoEngineShape ThaiEngineFc;
@@ -152,8 +153,10 @@ thai_get_font_info (PangoFont *font)
font_info = g_new (ThaiFontInfo, 1);
font_info->font = font;
- /* detect font set by determining availibility of glyphs */
- if (contain_glyphs(font, tis620_2))
+ /* detect font set by determining availibility of OT ruleset & glyphs */
+ if (thai_ot_get_ruleset (font))
+ font_info->font_set = THAI_FONT_TIS;
+ else if (contain_glyphs(font, tis620_2))
font_info->font_set = THAI_FONT_TIS_WIN;
else if (contain_glyphs(font, tis620_1))
font_info->font_set = THAI_FONT_TIS_MAC;