Commit 4d34ea52 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Add Yi script.

parent 345102ed
......@@ -644,6 +644,7 @@ static const ScriptShapeData ShapingData[] =
{{ no_features, 0}, NULL, "bopo", "", NULL, NULL},
{{ no_features, 0}, NULL, "kana", "", NULL, NULL},
{{ no_features, 0}, NULL, "hang", "", NULL, NULL},
{{ no_features, 0}, NULL, "yi ", "", NULL, NULL},
};
static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
......
......@@ -157,6 +157,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
#define bopo_tag MS_MAKE_TAG('b','o','p','o')
#define kana_tag MS_MAKE_TAG('k','a','n','a')
#define hang_tag MS_MAKE_TAG('h','a','n','g')
#define yi_tag MS_MAKE_TAG('y','i',' ',' ')
static void test_ScriptItemize( void )
{
......@@ -351,6 +352,11 @@ static void test_ScriptItemize( void )
static const itemTest t321[2] = {{{0,0,0,0,0},0,0,0,0,hang_tag,FALSE},{{0,0,0,0,0},3,0,0,0,-1,FALSE}};
static const itemTest t322[2] = {{{0,0,0,0,0},0,0,0,2,hang_tag,FALSE},{{0,0,0,0,0},3,0,0,0,-1,FALSE}};
/* Yi */
static const WCHAR test33[] = {0xa188,0xa320,0xa071,0xa0b7};
static const itemTest t331[2] = {{{0,0,0,0,0},0,0,0,0,yi_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}};
static const itemTest t332[2] = {{{0,0,0,0,0},0,0,0,2,yi_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}};
SCRIPT_ITEM items[15];
SCRIPT_CONTROL Control;
SCRIPT_STATE State;
......@@ -416,6 +422,7 @@ static void test_ScriptItemize( void )
test_items_ok(test30,8,NULL,NULL,1,t301,FALSE,0);
test_items_ok(test31,8,NULL,NULL,1,t311,FALSE,2);
test_items_ok(test32,3,NULL,NULL,1,t321,FALSE,0);
test_items_ok(test33,4,NULL,NULL,1,t331,FALSE,0);
State.uBidiLevel = 0;
test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
......@@ -455,6 +462,7 @@ static void test_ScriptItemize( void )
test_items_ok(test30,8,&Control,&State,1,t301,FALSE,0);
test_items_ok(test31,8,&Control,&State,1,t311,FALSE,2);
test_items_ok(test32,3,&Control,&State,1,t321,FALSE,0);
test_items_ok(test33,4,&Control,&State,1,t331,FALSE,0);
State.uBidiLevel = 1;
test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
......@@ -494,6 +502,7 @@ static void test_ScriptItemize( void )
test_items_ok(test30,8,&Control,&State,1,t302,FALSE,0);
test_items_ok(test31,8,&Control,&State,1,t312,FALSE,2);
test_items_ok(test32,3,&Control,&State,1,t322,FALSE,0);
test_items_ok(test33,4,&Control,&State,1,t332,FALSE,0);
State.uBidiLevel = 1;
Control.fMergeNeutralItems = TRUE;
......@@ -534,6 +543,7 @@ static void test_ScriptItemize( void )
test_items_ok(test30,8,&Control,&State,1,t302,FALSE,0);
test_items_ok(test31,8,&Control,&State,1,t312,FALSE,2);
test_items_ok(test32,3,&Control,&State,1,t322,FALSE,0);
test_items_ok(test33,4,&Control,&State,1,t332,FALSE,0);
}
static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
......
......@@ -214,6 +214,8 @@ static const scriptRange scriptRanges[] = {
{ Script_CJK_Han ,0x3400, 0x4dbf, 0, 0},
/* CJK Unified Ideographs: U+4E00–U+9FFF */
{ Script_CJK_Han ,0x4e00, 0x9fff, 0, 0},
/* Yi: U+A000–U+A4CF */
{ Script_Yi ,0xa000, 0xa4cf, 0, 0},
/* Cyrillic Extended-B: U+A640–U+A69F */
{ Script_Cyrillic, 0xa640, 0xa69f, 0, 0},
/* Modifier Tone Letters: U+A700–U+A71F */
......@@ -503,6 +505,10 @@ static const scriptData scriptInformation[] = {
{LANG_KOREAN, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0},
MS_MAKE_TAG('h','a','n','g'),
{0}},
{{Script_Yi, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
{LANG_ENGLISH, 0, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0},
MS_MAKE_TAG('y','i',' ',' '),
{'M','i','c','r','o','s','o','f','t',' ','Y','i',' ','B','a','i','t','i'}},
};
static const SCRIPT_PROPERTIES *script_props[] =
......@@ -536,7 +542,7 @@ static const SCRIPT_PROPERTIES *script_props[] =
&scriptInformation[52].props, &scriptInformation[53].props,
&scriptInformation[54].props, &scriptInformation[55].props,
&scriptInformation[56].props, &scriptInformation[57].props,
&scriptInformation[58].props
&scriptInformation[58].props, &scriptInformation[59].props
};
typedef struct {
......
......@@ -89,6 +89,7 @@
#define Script_Bopomofo 56
#define Script_Kana 57
#define Script_Hangul 58
#define Script_Yi 59
#define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment