Aric Stewart : usp10: Add Vai script.

Alexandre Julliard julliard at winehq.org
Wed Dec 14 13:23:34 CST 2011


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

Author: Aric Stewart <aric at codeweavers.com>
Date:   Wed Dec 14 07:29:03 2011 -0600

usp10: Add Vai script.

---

 dlls/usp10/shape.c          |    2 ++
 dlls/usp10/tests/usp10.c    |   10 ++++++++++
 dlls/usp10/usp10.c          |   13 ++++++++++++-
 dlls/usp10/usp10_internal.h |    2 ++
 4 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index 69ac076..acf1fdf 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -668,6 +668,8 @@ static const ScriptShapeData ShapingData[] =
     {{ mongolian_features, 4}, NULL, "mong", "", ContextualShape_Mongolian, NULL},
     {{ no_features, 0}, NULL, "tfng", "", NULL, NULL},
     {{ no_features, 0}, NULL, "nko ", "", NULL, NULL},
+    {{ no_features, 0}, NULL, "vai ", "", NULL, NULL},
+    {{ no_features, 0}, NULL, "vai ", "", NULL, NULL},
 };
 
 static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 6516fb8..932aaa7 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -162,6 +162,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
 #define mong_tag MS_MAKE_TAG('m','o','n','g')
 #define tfng_tag MS_MAKE_TAG('t','f','n','g')
 #define nko_tag MS_MAKE_TAG('n','k','o',' ')
+#define vai_tag MS_MAKE_TAG('v','a','i',' ')
 
 static void test_ScriptItemize( void )
 {
@@ -392,6 +393,11 @@ static void test_ScriptItemize( void )
     static const itemTest t371[2] = {{{0,0,0,0,0},0,1,1,1,nko_tag,TRUE,{-1,0,0,0,arab_tag}},{{0,0,0,0,0},3,0,0,0,-1,FALSE}};
     static const itemTest t372[2] = {{{0,0,0,0,0},0,1,1,1,nko_tag,TRUE,{-1,0,0,2,arab_tag}},{{0,0,0,0,0},3,0,0,0,-1,FALSE}};
 
+    /* Vai */
+    static const WCHAR test38[] = {0xa559,0xa524};
+    static const itemTest t381[2] = {{{0,0,0,0,0},0,0,0,0,vai_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}};
+    static const itemTest t382[2] = {{{0,0,0,0,0},0,0,0,2,vai_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}};
+
     SCRIPT_ITEM items[15];
     SCRIPT_CONTROL  Control;
     SCRIPT_STATE    State;
@@ -462,6 +468,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test35,13,NULL,NULL,1,t351,FALSE,b351);
     test_items_ok(test36,7,NULL,NULL,1,t361,FALSE,0);
     test_items_ok(test37,3,NULL,NULL,1,t371,FALSE,0);
+    test_items_ok(test38,2,NULL,NULL,1,t381,FALSE,0);
 
     State.uBidiLevel = 0;
     test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
@@ -506,6 +513,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test35,13,&Control,&State,1,t351,FALSE,b351);
     test_items_ok(test36,7,&Control,&State,1,t361,FALSE,0);
     test_items_ok(test37,3,&Control,&State,1,t371,FALSE,0);
+    test_items_ok(test38,2,&Control,&State,1,t381,FALSE,0);
 
     State.uBidiLevel = 1;
     test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
@@ -550,6 +558,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test35,13,&Control,&State,1,t352,FALSE,b352);
     test_items_ok(test36,7,&Control,&State,1,t362,FALSE,0);
     test_items_ok(test37,3,&Control,&State,1,t372,FALSE,0);
+    test_items_ok(test38,2,&Control,&State,1,t382,FALSE,0);
 
     State.uBidiLevel = 1;
     Control.fMergeNeutralItems = TRUE;
@@ -595,6 +604,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test35,13,&Control,&State,1,t352,FALSE,b352);
     test_items_ok(test36,7,&Control,&State,1,t362,FALSE,0);
     test_items_ok(test37,3,&Control,&State,1,t372,FALSE,0);
+    test_items_ok(test38,2,&Control,&State,1,t382,FALSE,0);
 }
 
 static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 37e94e4..a73d8e9 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -227,6 +227,8 @@ static const scriptRange scriptRanges[] = {
     { Script_CJK_Han    ,0x4e00, 0x9fff,  0, 0},
     /* Yi: U+A000–U+A4CF */
     { Script_Yi         ,0xa000, 0xa4cf,  0, 0},
+    /* Vai: U+A500–U+A63F */
+    { Script_Vai        ,0xa500, 0xa63f,  Script_Vai_Numeric, 0},
     /* Cyrillic Extended-B: U+A640–U+A69F */
     { Script_Cyrillic,   0xa640, 0xa69f,  0, 0},
     /* Modifier Tone Letters: U+A700–U+A71F */
@@ -544,6 +546,14 @@ static const scriptData scriptInformation[] = {
      {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
      MS_MAKE_TAG('n','k','o',' '),
      {0}},
+    {{Script_Vai, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
+     {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+     MS_MAKE_TAG('v','a','i',' '),
+     {'E','b','r','i','m','a'}},
+    {{Script_Vai_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
+     {0, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+     MS_MAKE_TAG('v','a','i',' '),
+     {'E','b','r','i','m','a'}},
 };
 
 static const SCRIPT_PROPERTIES *script_props[] =
@@ -580,7 +590,8 @@ static const SCRIPT_PROPERTIES *script_props[] =
     &scriptInformation[58].props, &scriptInformation[59].props,
     &scriptInformation[60].props, &scriptInformation[61].props,
     &scriptInformation[62].props, &scriptInformation[63].props,
-    &scriptInformation[64].props, &scriptInformation[65].props
+    &scriptInformation[64].props, &scriptInformation[65].props,
+    &scriptInformation[66].props, &scriptInformation[67].props
 };
 
 typedef struct {
diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h
index e2a5c15..03a219e 100644
--- a/dlls/usp10/usp10_internal.h
+++ b/dlls/usp10/usp10_internal.h
@@ -97,6 +97,8 @@
 #define Script_Mongolian_Numeric 63
 #define Script_Tifinagh 64
 #define Script_NKo 65
+#define Script_Vai 66
+#define Script_Vai_Numeric 67
 
 #define GLYPH_BLOCK_SHIFT 8
 #define GLYPH_BLOCK_SIZE  (1UL << GLYPH_BLOCK_SHIFT)




More information about the wine-cvs mailing list