Aric Stewart : usp10: Add Sinhala Script.

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


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

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

usp10: Add Sinhala Script.

---

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

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index f48210e..81809af 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -285,6 +285,19 @@ static OPENTYPE_FEATURE_RECORD syriac_features[] =
     { 0x67696c64 /*dlig*/, 1},
 };
 
+static OPENTYPE_FEATURE_RECORD sinhala_features[] =
+{
+    /* Base forms */
+    { 0x6e686b61 /*akhn*/, 1},
+    { 0x66687072 /*rphf*/, 1},
+    { 0x75746176 /*vatu*/, 1},
+    { 0x66747370 /*pstf*/, 1},
+    /* Presentation forms */
+    { 0x73776c62 /*blws*/, 1},
+    { 0x73766261 /*abvs*/, 1},
+    { 0x73747370 /*psts*/, 1},
+};
+
 typedef struct ScriptShapeDataTag {
     TEXTRANGE_PROPERTIES  defaultTextRange;
     CHAR                  otTag[5];
@@ -310,6 +323,7 @@ static const ScriptShapeData ShapingData[] =
     {{ standard_features, 2}, "cyrl", NULL},
     {{ standard_features, 2}, "armn", NULL},
     {{ standard_features, 2}, "geor", NULL},
+    {{ sinhala_features, 7}, "sinh", NULL},
 };
 
 static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index aac53f2..235bb8a 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -77,6 +77,8 @@ static const scriptRange scriptRanges[] = {
     { Script_Arabic,     0x750,  0x77f,  0, 0},
     /* Thaana: U+0780–U+07BF */
     { Script_Thaana,     0x780,  0x7bf,  0, 0},
+    /* Sinhala: U+0D80–U+0DFF */
+    { Script_Sinhala,   0xd80,  0xdff,  0, 0},
     /* Georgian: U+10A0–U+10FF */
     { Script_Georgian,   0x10a0,  0x10ff,  0, 0},
     /* Phonetic Extensions: U+1D00–U+1DBF */
@@ -150,6 +152,8 @@ static const scriptData scriptInformation[] = {
      {LANG_ARMENIAN, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}},
     {{Script_Georgian, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
      {LANG_GEORGIAN, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}},
+    {{Script_Sinhala, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
+     {LANG_SINHALESE, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
 };
 
 static const SCRIPT_PROPERTIES *script_props[] =
@@ -161,7 +165,8 @@ static const SCRIPT_PROPERTIES *script_props[] =
     &scriptInformation[8].props, &scriptInformation[9].props,
     &scriptInformation[10].props, &scriptInformation[11].props,
     &scriptInformation[12].props, &scriptInformation[13].props,
-    &scriptInformation[14].props, &scriptInformation[15].props
+    &scriptInformation[14].props, &scriptInformation[15].props,
+    &scriptInformation[16].props
 };
 
 typedef struct {
diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h
index 6a3cb1b..b41de7d 100644
--- a/dlls/usp10/usp10_internal.h
+++ b/dlls/usp10/usp10_internal.h
@@ -34,6 +34,8 @@
 #define Script_Cyrillic   13
 #define Script_Armenian 14
 #define Script_Georgian 15
+/* Unicode Chapter 10 */
+#define Script_Sinhala 16
 
 #define GLYPH_BLOCK_SHIFT 8
 #define GLYPH_BLOCK_SIZE  (1UL << GLYPH_BLOCK_SHIFT)




More information about the wine-cvs mailing list