usp10: Add Kana script.
This commit is contained in:
parent
513a8c5020
commit
30dc47557a
|
@ -642,6 +642,7 @@ static const ScriptShapeData ShapingData[] =
|
|||
{{ no_features, 0}, NULL, "hani", "", NULL, NULL},
|
||||
{{ no_features, 0}, NULL, "hani", "", NULL, NULL},
|
||||
{{ no_features, 0}, NULL, "bopo", "", NULL, NULL},
|
||||
{{ no_features, 0}, NULL, "kana", "", NULL, NULL},
|
||||
};
|
||||
|
||||
static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
|
||||
|
|
|
@ -155,6 +155,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
|
|||
#define khmr_tag MS_MAKE_TAG('k','h','m','r')
|
||||
#define hani_tag MS_MAKE_TAG('h','a','n','i')
|
||||
#define bopo_tag MS_MAKE_TAG('b','o','p','o')
|
||||
#define kana_tag MS_MAKE_TAG('k','a','n','a')
|
||||
|
||||
static void test_ScriptItemize( void )
|
||||
{
|
||||
|
@ -339,6 +340,11 @@ static void test_ScriptItemize( void )
|
|||
static const itemTest t301[2] = {{{0,0,0,0,0},0,0,0,0,bopo_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}};
|
||||
static const itemTest t302[2] = {{{0,0,0,0,0},0,0,0,2,bopo_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}};
|
||||
|
||||
/* Kana */
|
||||
static const WCHAR test31[] = {0x3072,0x3089,0x304b,0x306a,0x30ab,0x30bf,0x30ab,0x30ca};
|
||||
static const itemTest t311[2] = {{{0,0,0,0,0},0,0,0,0,kana_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}};
|
||||
static const itemTest t312[2] = {{{0,0,0,0,0},0,0,0,2,kana_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}};
|
||||
|
||||
SCRIPT_ITEM items[15];
|
||||
SCRIPT_CONTROL Control;
|
||||
SCRIPT_STATE State;
|
||||
|
@ -402,6 +408,7 @@ static void test_ScriptItemize( void )
|
|||
test_items_ok(test28,4,NULL,NULL,1,t281,FALSE,0);
|
||||
test_items_ok(test29,10,NULL,NULL,2,t291,FALSE,0);
|
||||
test_items_ok(test30,8,NULL,NULL,1,t301,FALSE,0);
|
||||
test_items_ok(test31,8,NULL,NULL,1,t311,FALSE,2);
|
||||
|
||||
State.uBidiLevel = 0;
|
||||
test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
|
||||
|
@ -439,6 +446,7 @@ static void test_ScriptItemize( void )
|
|||
test_items_ok(test28,4,&Control,&State,1,t281,FALSE,0);
|
||||
test_items_ok(test29,10,&Control,&State,2,t291,FALSE,0);
|
||||
test_items_ok(test30,8,&Control,&State,1,t301,FALSE,0);
|
||||
test_items_ok(test31,8,&Control,&State,1,t311,FALSE,2);
|
||||
|
||||
State.uBidiLevel = 1;
|
||||
test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
|
||||
|
@ -476,6 +484,7 @@ static void test_ScriptItemize( void )
|
|||
test_items_ok(test28,4,&Control,&State,1,t282,FALSE,0);
|
||||
test_items_ok(test29,10,&Control,&State,2,t292,FALSE,0);
|
||||
test_items_ok(test30,8,&Control,&State,1,t302,FALSE,0);
|
||||
test_items_ok(test31,8,&Control,&State,1,t312,FALSE,2);
|
||||
|
||||
State.uBidiLevel = 1;
|
||||
Control.fMergeNeutralItems = TRUE;
|
||||
|
@ -514,6 +523,7 @@ static void test_ScriptItemize( void )
|
|||
test_items_ok(test28,4,&Control,&State,1,t282,FALSE,0);
|
||||
test_items_ok(test29,10,&Control,&State,2,t292,FALSE,0);
|
||||
test_items_ok(test30,8,&Control,&State,1,t302,FALSE,0);
|
||||
test_items_ok(test31,8,&Control,&State,1,t312,FALSE,2);
|
||||
}
|
||||
|
||||
static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
|
||||
|
|
|
@ -179,9 +179,14 @@ static const scriptRange scriptRanges[] = {
|
|||
{ Script_Ideograph ,0x3008, 0x3020, 0, 0},
|
||||
{ Script_CJK_Han ,0x3021, 0x3029, 0, 0},
|
||||
{ Script_Ideograph ,0x302a, 0x3030, 0, 0},
|
||||
/* Kana Marks: */
|
||||
{ Script_Kana ,0x3031, 0x3035, 0, 0},
|
||||
{ Script_Ideograph ,0x3036, 0x3037, 0, 0},
|
||||
{ Script_CJK_Han ,0x3038, 0x303b, 0, 0},
|
||||
{ Script_Ideograph ,0x303c, 0x303f, 0, 0},
|
||||
/* Hiragana: U+3040–U+309F */
|
||||
/* Katakana: U+30A0–U+30FF */
|
||||
{ Script_Kana ,0x3040, 0x30ff, 0, 0},
|
||||
/* Bopomofo: U+3100–U+312F */
|
||||
{ Script_Bopomofo ,0x3100, 0x312f, 0, 0},
|
||||
/* Kanbun: U+3190–U+319F */
|
||||
|
@ -190,10 +195,14 @@ static const scriptRange scriptRanges[] = {
|
|||
{ Script_Bopomofo ,0x31a0, 0x31bf, 0, 0},
|
||||
/* CJK Strokes: U+31C0–U+31EF */
|
||||
{ Script_Ideograph ,0x31c0, 0x31ef, 0, 0},
|
||||
/* Katakana Phonetic Extensions: U+31F0–U+31FF */
|
||||
{ Script_Kana ,0x31f0, 0x31ff, 0, 0},
|
||||
/* Enclosed CJK Letters and Months: U+3200–U+32FF */
|
||||
{ Script_Ideograph ,0x3220, 0x32ff, 0, 0},
|
||||
{ Script_Ideograph ,0x3220, 0x32ef, 0, 0},
|
||||
{ Script_Kana ,0x32d0, 0x31ff, 0, 0},
|
||||
/* CJK Compatibility: U+3300–U+33FF*/
|
||||
{ Script_Ideograph ,0x3300, 0x33ff, 0, 0},
|
||||
{ Script_Kana ,0x3300, 0x3357, 0, 0},
|
||||
{ Script_Ideograph ,0x3358, 0x33ff, 0, 0},
|
||||
/* CJK Unified Ideographs Extension A: U+3400–U+4DBF */
|
||||
{ Script_CJK_Han ,0x3400, 0x4dbf, 0, 0},
|
||||
/* CJK Unified Ideographs: U+4E00–U+9FFF */
|
||||
|
@ -228,6 +237,7 @@ static const scriptRange scriptRanges[] = {
|
|||
{ Script_Arabic, 0xfe70, 0xfeff, 0, 0},
|
||||
/* Halfwidth and Fullwidth Forms: U+FF00–FFEF */
|
||||
{ Script_Ideograph ,0xff00, 0xff64, Script_Numeric2, 0},
|
||||
{ Script_Kana ,0xff65, 0xff9f, 0, 0},
|
||||
{ Script_Ideograph ,0xffe0, 0xffef, 0, 0},
|
||||
/* END */
|
||||
{ SCRIPT_UNDEFINED, 0, 0, 0}
|
||||
|
@ -471,6 +481,10 @@ static const scriptData scriptInformation[] = {
|
|||
{LANG_ENGLISH, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0},
|
||||
MS_MAKE_TAG('b','o','p','o'),
|
||||
{0}},
|
||||
{{Script_Kana, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
|
||||
{LANG_ENGLISH, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0},
|
||||
MS_MAKE_TAG('k','a','n','a'),
|
||||
{0}},
|
||||
};
|
||||
|
||||
static const SCRIPT_PROPERTIES *script_props[] =
|
||||
|
@ -503,7 +517,7 @@ static const SCRIPT_PROPERTIES *script_props[] =
|
|||
&scriptInformation[50].props, &scriptInformation[51].props,
|
||||
&scriptInformation[52].props, &scriptInformation[53].props,
|
||||
&scriptInformation[54].props, &scriptInformation[55].props,
|
||||
&scriptInformation[56].props
|
||||
&scriptInformation[56].props, &scriptInformation[57].props
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
#define Script_CJK_Han 54
|
||||
#define Script_Ideograph 55
|
||||
#define Script_Bopomofo 56
|
||||
#define Script_Kana 57
|
||||
|
||||
#define GLYPH_BLOCK_SHIFT 8
|
||||
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)
|
||||
|
|
Loading…
Reference in New Issue