From 05cd57b4f0fa799fa060739cf04be42959b0029f Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Mon, 12 Dec 2011 07:32:10 -0600 Subject: [PATCH] usp10: Add New Tai Lue 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 deletion(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index f2b2a7bd752..d2926ff2dee 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -607,6 +607,8 @@ static const ScriptShapeData ShapingData[] = {{ myanmar_features, 2}, NULL, "mymr", "", NULL, NULL}, {{ myanmar_features, 2}, NULL, "mymr", "", NULL, NULL}, {{ standard_features, 2}, NULL, "tale", "", NULL, NULL}, + {{ standard_features, 2}, NULL, "talu", "", NULL, NULL}, + {{ standard_features, 2}, NULL, "talu", "", 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 7ae232a2928..45661b2963d 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -151,6 +151,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString, #define mlym_tag MS_MAKE_TAG('m','l','y','m') #define mymr_tag MS_MAKE_TAG('m','y','m','r') #define tale_tag MS_MAKE_TAG('t','a','l','e') +#define talu_tag MS_MAKE_TAG('t','a','l','u') static void test_ScriptItemize( void ) { @@ -310,6 +311,11 @@ static void test_ScriptItemize( void ) static const itemTest t251[2] = {{{0,0,0,0,0},0,0,0,0,tale_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; static const itemTest t252[2] = {{{0,0,0,0,0},0,0,0,2,tale_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; + /* New Tai Lue */ + static const WCHAR test26[] = {0x1992,0x19c4}; + static const itemTest t261[2] = {{{0,0,0,0,0},0,0,0,0,talu_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}}; + static const itemTest t262[2] = {{{0,0,0,0,0},0,0,0,2,talu_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}}; + SCRIPT_ITEM items[15]; @@ -370,6 +376,7 @@ static void test_ScriptItemize( void ) test_items_ok(test23,6,NULL,NULL,2,t231,FALSE,0); test_items_ok(test24,12,NULL,NULL,1,t241,FALSE,0); test_items_ok(test25,10,NULL,NULL,1,t251,FALSE,0); + test_items_ok(test26,2,NULL,NULL,1,t261,FALSE,0); State.uBidiLevel = 0; test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0); @@ -402,6 +409,7 @@ static void test_ScriptItemize( void ) test_items_ok(test23,6,&Control,&State,2,t231,FALSE,0); test_items_ok(test24,12,&Control,&State,1,t241,FALSE,0); test_items_ok(test25,10,&Control,&State,1,t251,FALSE,0); + test_items_ok(test26,2,&Control,&State,1,t261,FALSE,0); State.uBidiLevel = 1; test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0); @@ -434,6 +442,7 @@ static void test_ScriptItemize( void ) test_items_ok(test23,6,&Control,&State,2,t232,FALSE,0); test_items_ok(test24,12,&Control,&State,1,t242,FALSE,0); test_items_ok(test25,10,&Control,&State,1,t252,FALSE,0); + test_items_ok(test26,2,&Control,&State,1,t262,FALSE,0); State.uBidiLevel = 1; Control.fMergeNeutralItems = TRUE; @@ -467,6 +476,7 @@ static void test_ScriptItemize( void ) test_items_ok(test23,6,&Control,&State,2,t232,FALSE,0); test_items_ok(test24,12,&Control,&State,1,t242,FALSE,0); test_items_ok(test25,10,&Control,&State,1,t252,FALSE,0); + test_items_ok(test26,2,&Control,&State,1,t262,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 5782591c536..846d03c300a 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -113,6 +113,8 @@ static const scriptRange scriptRanges[] = { { Script_Georgian, 0x10a0, 0x10ff, 0, 0}, /* Tai Le: U+1950–U+197F */ { Script_Tai_Le, 0x1950, 0x197f, 0, 0}, + /* New Tai Lue: U+1980–U+19DF */ + { Script_New_Tai_Lue,0x1980, 0x19df, Script_New_Tai_Lue_Numeric, 0}, /* Vedic Extensions: U+1CD0-U+1CFF */ { Script_Devanagari, 0x1cd0, 0x1cff, Script_Devanagari_Numeric, 0}, /* Phonetic Extensions: U+1D00–U+1DBF */ @@ -395,6 +397,14 @@ static const scriptData scriptInformation[] = { {0, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('t','a','l','e'), {'M','i','c','r','o','s','o','f','t',' ','T','a','i',' ','L','e'}}, + {{Script_New_Tai_Lue, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, + {0, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + MS_MAKE_TAG('t','a','l','u'), + {'M','i','c','r','o','s','o','f','t',' ','N','e','w',' ','T','a','i',' ','L','u','e'}}, + {{Script_New_Tai_Lue_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, + {0, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + MS_MAKE_TAG('t','a','l','u'), + {'M','i','c','r','o','s','o','f','t',' ','N','e','w',' ','T','a','i',' ','L','u','e'}}, }; static const SCRIPT_PROPERTIES *script_props[] = @@ -423,7 +433,8 @@ static const SCRIPT_PROPERTIES *script_props[] = &scriptInformation[42].props, &scriptInformation[43].props, &scriptInformation[44].props, &scriptInformation[45].props, &scriptInformation[46].props, &scriptInformation[47].props, - &scriptInformation[48].props, &scriptInformation[49].props + &scriptInformation[48].props, &scriptInformation[49].props, + &scriptInformation[50].props, &scriptInformation[51].props }; typedef struct { diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 2a385d5d57c..5bb352a768b 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -79,6 +79,8 @@ #define Script_Myanmar 47 #define Script_Myanmar_Numeric 48 #define Script_Tai_Le 49 +#define Script_New_Tai_Lue 50 +#define Script_New_Tai_Lue_Numeric 51 #define GLYPH_BLOCK_SHIFT 8 #define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT) -- 2.11.4.GIT