Aric Stewart : usp10: Add Deseret script.

Alexandre Julliard julliard at winehq.org
Mon Dec 19 13:39:23 CST 2011


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

Author: Aric Stewart <aric at codeweavers.com>
Date:   Sat Dec 17 21:27:02 2011 -0600

usp10: Add Deseret script.

---

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

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index e889ba8..fcbf92c 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -711,6 +711,7 @@ static const ScriptShapeData ShapingData[] =
     {{ no_features, 0}, NULL, "brai", "", NULL, NULL},
     {{ no_features, 0}, NULL, "", "", NULL, NULL},
     {{ no_features, 0}, NULL, "", "", NULL, NULL},
+    {{ no_features, 0}, NULL, "dsrt", "", 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 64cbb30..9651000 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -168,6 +168,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
 #define ogam_tag MS_MAKE_TAG('o','g','a','m')
 #define runr_tag MS_MAKE_TAG('r','u','n','r')
 #define brai_tag MS_MAKE_TAG('b','r','a','i')
+#define dsrt_tag MS_MAKE_TAG('d','s','r','t')
 
 static void test_ScriptItemize( void )
 {
@@ -434,6 +435,11 @@ static void test_ScriptItemize( void )
     static const itemTest t441[3] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},2,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}};
     static const itemTest t442[4] = {{{0,0,0,0,0},0,0,0,2,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},2,0,0,2,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},4,0,0,0,-1,FALSE}};
 
+    /* Deseret */
+    static const WCHAR test45[] = {0xd801,0xdc19,0xd801,0xdc32,0xd801,0xdc4c,0xd801,0xdc3c,0xd801,0xdc32,0xd801,0xdc4b,0xd801,0xdc2f,0xd801,0xdc4c,0xd801,0xdc3b,0xd801,0xdc32,0xd801,0xdc4a,0xd801,0xdc28};
+    static const itemTest t451[2] = {{{0,0,0,0,0},0,0,0,0,dsrt_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0},24,0,0,0,-1,FALSE}};
+    static const itemTest t452[2] = {{{0,0,0,0,0},0,0,0,2,dsrt_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0},24,0,0,0,-1,FALSE}};
+
     SCRIPT_ITEM items[15];
     SCRIPT_CONTROL  Control;
     SCRIPT_STATE    State;
@@ -511,6 +517,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test42,6,NULL,NULL,1,t421,FALSE,0);
     test_items_ok(test43,7,NULL,NULL,1,t431,FALSE,0);
     test_items_ok(test44,4,NULL,NULL,2,t441,FALSE,0);
+    test_items_ok(test45,24,NULL,NULL,1,t451,FALSE,0);
 
     State.uBidiLevel = 0;
     test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
@@ -562,6 +569,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test42,6,&Control,&State,1,t421,FALSE,0);
     test_items_ok(test43,7,&Control,&State,1,t431,FALSE,0);
     test_items_ok(test44,4,&Control,&State,2,t441,FALSE,0);
+    test_items_ok(test45,24,&Control,&State,1,t451,FALSE,0);
 
     State.uBidiLevel = 1;
     test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
@@ -613,6 +621,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test42,6,&Control,&State,1,t422,FALSE,0);
     test_items_ok(test43,7,&Control,&State,1,t432,FALSE,0);
     test_items_ok(test44,4,&Control,&State,2,t442,FALSE,0);
+    test_items_ok(test45,24,&Control,&State,1,t452,FALSE,0);
 
     State.uBidiLevel = 1;
     Control.fMergeNeutralItems = TRUE;
@@ -665,6 +674,7 @@ static void test_ScriptItemize( void )
     test_items_ok(test42,6,&Control,&State,1,t422,FALSE,0);
     test_items_ok(test43,7,&Control,&State,1,t432,FALSE,0);
     test_items_ok(test44,4,&Control,&State,2,t442,FALSE,0);
+    test_items_ok(test45,24,&Control,&State,1,t452,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 7a32937..a05f7b6 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -287,6 +287,9 @@ static const scriptRange scriptRanges[] = {
     { Script_Kana       ,0xff65, 0xff9f,  0, 0},
     { Script_Hangul     ,0xffa0, 0xffdf,  0, 0},
     { Script_Ideograph  ,0xffe0, 0xffef,  0, 0},
+    /* Plane - 1 */
+    /* Deseret: U+10400–U+1044F */
+    { Script_Deseret,     0x10400, 0x1044F,  0, 0},
     /* END */
     { SCRIPT_UNDEFINED,  0, 0, 0}
 };
@@ -601,6 +604,10 @@ static const scriptData scriptInformation[] = {
      {0, 0, 0, 0, 0, DEFAULT_CHARSET, 0, 1, 0, 0, 0, 0, 1, 0, 0},
      0x00000000,
      {0}},
+    {{Script_Deseret, 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('d','s','r','t'),
+     {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}},
 };
 
 static const SCRIPT_PROPERTIES *script_props[] =
@@ -642,7 +649,7 @@ static const SCRIPT_PROPERTIES *script_props[] =
     &scriptInformation[68].props, &scriptInformation[69].props,
     &scriptInformation[70].props, &scriptInformation[71].props,
     &scriptInformation[72].props, &scriptInformation[73].props,
-    &scriptInformation[74].props
+    &scriptInformation[74].props, &scriptInformation[75].props
 };
 
 typedef struct {
diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h
index f310011..1d88ee1 100644
--- a/dlls/usp10/usp10_internal.h
+++ b/dlls/usp10/usp10_internal.h
@@ -109,6 +109,8 @@
 /* Unicode Chapter 16 */
 #define Script_Surrogates 73
 #define Script_Private 74
+/* Unicode Chapter 13 : Plane 1 */
+#define Script_Deseret 75
 
 #define GLYPH_BLOCK_SHIFT 8
 #define GLYPH_BLOCK_SIZE  (1UL << GLYPH_BLOCK_SHIFT)




More information about the wine-cvs mailing list