Aric Stewart : usp10: Add Cherokee script.

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


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

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

usp10: Add Cherokee script.

---

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

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index acf1fdf..ff1a229 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -670,6 +670,7 @@ static const ScriptShapeData ShapingData[] =
     {{ no_features, 0}, NULL, "nko ", "", NULL, NULL},
     {{ no_features, 0}, NULL, "vai ", "", NULL, NULL},
     {{ no_features, 0}, NULL, "vai ", "", NULL, NULL},
+    {{ no_features, 0}, NULL, "cher", "", 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 932aaa7..0d520c7 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -163,6 +163,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
 #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',' ')
+#define cher_tag MS_MAKE_TAG('c','h','e','r')
 
 static void test_ScriptItemize( void )
 {
@@ -398,6 +399,11 @@ static void test_ScriptItemize( void )
     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}};
 
+    /* Cherokee */
+    static const WCHAR test39[] = {0x13e3,0x13b3,0x13a9,0x0020,0x13a6,0x13ec,0x13c2,0x13af,0x13cd,0x13d7};
+    static const itemTest t391[2] = {{{0,0,0,0,0},0,0,0,0,cher_tag,FALSE},{{0,0,0,0,0},10,0,0,0,-1,FALSE}};
+    static const itemTest t392[2] = {{{0,0,0,0,0},0,0,0,2,cher_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},10,0,0,0,-1,FALSE}};
+
     SCRIPT_ITEM items[15];
     SCRIPT_CONTROL  Control;
     SCRIPT_STATE    State;
@@ -469,6 +475,7 @@ static void test_ScriptItemize( void )
     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);
+    test_items_ok(test39,10,NULL,NULL,1,t391,FALSE,0);
 
     State.uBidiLevel = 0;
     test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
@@ -514,6 +521,7 @@ static void test_ScriptItemize( void )
     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);
+    test_items_ok(test39,10,&Control,&State,1,t391,FALSE,0);
 
     State.uBidiLevel = 1;
     test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
@@ -559,6 +567,7 @@ static void test_ScriptItemize( void )
     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);
+    test_items_ok(test39,10,&Control,&State,1,t392,FALSE,0);
 
     State.uBidiLevel = 1;
     Control.fMergeNeutralItems = TRUE;
@@ -605,6 +614,7 @@ static void test_ScriptItemize( void )
     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);
+    test_items_ok(test39,10,&Control,&State,1,t392,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 a73d8e9..d69ce06 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -118,6 +118,8 @@ static const scriptRange scriptRanges[] = {
     /* Ethiopic: U+1200–U+137F */
     /* Ethiopic Extensions: U+1380–U+139F */
     { Script_Ethiopic,   0x1200,  0x139f,  0, 0},
+    /* Cherokee: U+13A0–U+13FF */
+    { Script_Cherokee,   0x13a0,  0x13ff,  0, 0},
     /* Khmer: U+1780–U+17FF */
     { Script_Khmer,      0x1780,  0x17ff,  Script_Khmer_Numeric, 0},
     /* Mongolian: U+1800–U+18AF */
@@ -554,6 +556,10 @@ static const scriptData scriptInformation[] = {
      {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'}},
+    {{Script_Cherokee, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
+     {0x5c, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+     MS_MAKE_TAG('c','h','e','r'),
+     {'P','l','a','n','t','a','g','e','n','e','t',' ','C','h','e','r','o','k','e','e'}},
 };
 
 static const SCRIPT_PROPERTIES *script_props[] =
@@ -591,7 +597,8 @@ static const SCRIPT_PROPERTIES *script_props[] =
     &scriptInformation[60].props, &scriptInformation[61].props,
     &scriptInformation[62].props, &scriptInformation[63].props,
     &scriptInformation[64].props, &scriptInformation[65].props,
-    &scriptInformation[66].props, &scriptInformation[67].props
+    &scriptInformation[66].props, &scriptInformation[67].props,
+    &scriptInformation[68].props
 };
 
 typedef struct {
diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h
index 03a219e..969fb4e 100644
--- a/dlls/usp10/usp10_internal.h
+++ b/dlls/usp10/usp10_internal.h
@@ -99,6 +99,7 @@
 #define Script_NKo 65
 #define Script_Vai 66
 #define Script_Vai_Numeric 67
+#define Script_Cherokee 68
 
 #define GLYPH_BLOCK_SHIFT 8
 #define GLYPH_BLOCK_SIZE  (1UL << GLYPH_BLOCK_SHIFT)




More information about the wine-cvs mailing list