Aric Stewart : usp10: Add Thai Script.

Alexandre Julliard julliard at winehq.org
Wed Aug 25 12:35:04 CDT 2010


Module: wine
Branch: master
Commit: 331c8cdef6fd66316a90914bea45d6b74448fbe9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=331c8cdef6fd66316a90914bea45d6b74448fbe9

Author: Aric Stewart <aric at codeweavers.com>
Date:   Tue Aug 24 11:55:33 2010 -0500

usp10: Add Thai Script.

---

 dlls/usp10/shape.c          |    7 +++++++
 dlls/usp10/usp10.c          |    9 ++++++++-
 dlls/usp10/usp10_internal.h |    3 +++
 3 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index 3f3513d..9272c70 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -305,6 +305,11 @@ static OPENTYPE_FEATURE_RECORD tibetan_features[] =
     { 0x73776c62 /*blws*/, 1},
 };
 
+static OPENTYPE_FEATURE_RECORD thai_features[] =
+{
+    { 0x706d6363 /*ccmp*/, 1},
+};
+
 typedef struct ScriptShapeDataTag {
     TEXTRANGE_PROPERTIES  defaultTextRange;
     CHAR                  otTag[5];
@@ -334,6 +339,8 @@ static const ScriptShapeData ShapingData[] =
     {{ tibetan_features, 2}, "tibt", NULL},
     {{ tibetan_features, 2}, "tibt", NULL},
     {{ tibetan_features, 2}, "phag", ContextualShape_Phags_pa},
+    {{ thai_features, 1}, "thai", NULL},
+    {{ thai_features, 1}, "thai", NULL},
 };
 
 static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index c18c532..0bffd27 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -79,6 +79,8 @@ static const scriptRange scriptRanges[] = {
     { Script_Thaana,     0x780,  0x7bf,  0, 0},
     /* Sinhala: U+0D80–U+0DFF */
     { Script_Sinhala,   0xd80,  0xdff,  0, 0},
+    /* Thai: U+0E00–U+0E7F */
+    { Script_Thai,      0xe00,  0xe7f,  Script_Thai_Numeric, 0},
     /* Tibetan: U+0F00–U+0FFF */
     { Script_Tibetan,   0xf00,  0xfff,  Script_Tibetan_Numeric, 0},
     /* Georgian: U+10A0–U+10FF */
@@ -164,6 +166,10 @@ static const scriptData scriptInformation[] = {
      {LANG_TIBETAN, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
     {{Script_Phags_pa, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
      {LANG_MONGOLIAN, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
+    {{Script_Thai, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
+     {LANG_THAI, 0, 1, 1, 1, THAI_CHARSET, 0, 0, 1, 0, 1, 0, 0, 0, 1}},
+    {{Script_Thai_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
+     {LANG_THAI, 1, 1, 0, 0, THAI_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
 };
 
 static const SCRIPT_PROPERTIES *script_props[] =
@@ -177,7 +183,8 @@ static const SCRIPT_PROPERTIES *script_props[] =
     &scriptInformation[12].props, &scriptInformation[13].props,
     &scriptInformation[14].props, &scriptInformation[15].props,
     &scriptInformation[16].props, &scriptInformation[17].props,
-    &scriptInformation[18].props, &scriptInformation[19].props
+    &scriptInformation[18].props, &scriptInformation[19].props,
+    &scriptInformation[20].props, &scriptInformation[21].props
 };
 
 typedef struct {
diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h
index bfde66d..815d2e2 100644
--- a/dlls/usp10/usp10_internal.h
+++ b/dlls/usp10/usp10_internal.h
@@ -39,6 +39,9 @@
 #define Script_Tibetan 17
 #define Script_Tibetan_Numeric 18
 #define Script_Phags_pa 19
+/* Unicode Chapter 11 */
+#define Script_Thai 20
+#define Script_Thai_Numeric 21
 
 #define GLYPH_BLOCK_SHIFT 8
 #define GLYPH_BLOCK_SIZE  (1UL << GLYPH_BLOCK_SHIFT)




More information about the wine-cvs mailing list