Module: wine Branch: master Commit: 1c079ad1964ea859b0e76c31cf38aa21800f0b21 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c079ad1964ea859b0e76c31cf...
Author: Aric Stewart aric@codeweavers.com Date: Wed Dec 14 07:29:39 2011 -0600
usp10: Add Runic Script.
---
dlls/usp10/shape.c | 1 + dlls/usp10/tests/usp10.c | 10 ++++++++++ dlls/usp10/usp10.c | 8 +++++++- dlls/usp10/usp10_internal.h | 1 + 4 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 3b8eb6d..d7f7d8b 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -673,6 +673,7 @@ static const ScriptShapeData ShapingData[] = {{ no_features, 0}, NULL, "cher", "", NULL, NULL}, {{ no_features, 0}, NULL, "cans", "", NULL, NULL}, {{ no_features, 0}, NULL, "ogam", "", NULL, NULL}, + {{ no_features, 0}, NULL, "runr", "", 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 0439d5f..29db5f7 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -166,6 +166,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString, #define cher_tag MS_MAKE_TAG('c','h','e','r') #define cans_tag MS_MAKE_TAG('c','a','n','s') #define ogam_tag MS_MAKE_TAG('o','g','a','m') +#define runr_tag MS_MAKE_TAG('r','u','n','r')
static void test_ScriptItemize( void ) { @@ -417,6 +418,11 @@ static void test_ScriptItemize( void ) static const itemTest t412[4] = {{{0,0,0,0,0},0,1,1,1,ogam_tag,FALSE},{{0,0,0,0,0},1,0,0,2,ogam_tag,FALSE},{{0,0,0,0,0},5,1,1,1,ogam_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; static const int b412[2] = {1,1};
+ /* Runic */ + static const WCHAR test42[] = {0x16a0,0x16a1,0x16a2,0x16a3,0x16a4,0x16a5}; + static const itemTest t421[2] = {{{0,0,0,0,0},0,0,0,0,runr_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t422[4] = {{{0,0,0,0,0},0,0,0,2,runr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + SCRIPT_ITEM items[15]; SCRIPT_CONTROL Control; SCRIPT_STATE State; @@ -491,6 +497,7 @@ static void test_ScriptItemize( void ) test_items_ok(test39,10,NULL,NULL,1,t391,FALSE,0); test_items_ok(test40,6,NULL,NULL,1,t401,FALSE,0); test_items_ok(test41,6,NULL,NULL,1,t411,FALSE,0); + test_items_ok(test42,6,NULL,NULL,1,t421,FALSE,0);
State.uBidiLevel = 0; test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0); @@ -539,6 +546,7 @@ static void test_ScriptItemize( void ) test_items_ok(test39,10,&Control,&State,1,t391,FALSE,0); test_items_ok(test40,6,&Control,&State,1,t401,FALSE,0); test_items_ok(test41,6,&Control,&State,1,t411,FALSE,0); + test_items_ok(test42,6,&Control,&State,1,t421,FALSE,0);
State.uBidiLevel = 1; test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0); @@ -587,6 +595,7 @@ static void test_ScriptItemize( void ) test_items_ok(test39,10,&Control,&State,1,t392,FALSE,0); test_items_ok(test40,6,&Control,&State,1,t402,FALSE,0); test_items_ok(test41,6,&Control,&State,3,t412,FALSE,b412); + test_items_ok(test42,6,&Control,&State,1,t422,FALSE,0);
State.uBidiLevel = 1; Control.fMergeNeutralItems = TRUE; @@ -636,6 +645,7 @@ static void test_ScriptItemize( void ) test_items_ok(test39,10,&Control,&State,1,t392,FALSE,0); test_items_ok(test40,6,&Control,&State,1,t402,FALSE,0); test_items_ok(test41,6,&Control,&State,3,t412,FALSE,b412); + test_items_ok(test42,6,&Control,&State,1,t422,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 c1f7967..a97f8ba 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -124,6 +124,8 @@ static const scriptRange scriptRanges[] = { { Script_Canadian, 0x1400, 0x167f, 0, 0}, /* Ogham: U+1680–U+169F */ { Script_Ogham, 0x1680, 0x169f, 0, 0}, + /* Runic: U+16A0–U+16F0 */ + { Script_Runic, 0x16a0, 0x16f0, 0, 0}, /* Khmer: U+1780–U+17FF */ { Script_Khmer, 0x1780, 0x17ff, Script_Khmer_Numeric, 0}, /* Mongolian: U+1800–U+18AF */ @@ -574,6 +576,10 @@ static const scriptData scriptInformation[] = { {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('o','g','a','m'), {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}}, + {{Script_Runic, 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('r','u','n','r'), + {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}}, };
static const SCRIPT_PROPERTIES *script_props[] = @@ -613,7 +619,7 @@ static const SCRIPT_PROPERTIES *script_props[] = &scriptInformation[64].props, &scriptInformation[65].props, &scriptInformation[66].props, &scriptInformation[67].props, &scriptInformation[68].props, &scriptInformation[69].props, - &scriptInformation[70].props + &scriptInformation[70].props, &scriptInformation[71].props };
typedef struct { diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index f02556c..9ff4e60 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -103,6 +103,7 @@ #define Script_Canadian 69 /* Unicode Chapter 14 */ #define Script_Ogham 70 +#define Script_Runic 71
#define GLYPH_BLOCK_SHIFT 8 #define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)