usp10: Add Mathematical Alphanumeric Symbols script.

This commit is contained in:
Aric Stewart 2011-12-19 07:25:17 -06:00 committed by Alexandre Julliard
parent 88c6b7ef00
commit 00588673c6
4 changed files with 21 additions and 1 deletions

View File

@ -714,6 +714,7 @@ static const ScriptShapeData ShapingData[] =
{{ no_features, 0}, NULL, "dsrt", "", NULL, NULL},
{{ no_features, 0}, NULL, "osma", "", NULL, NULL},
{{ no_features, 0}, NULL, "osma", "", NULL, NULL},
{{ no_features, 0}, NULL, "math", "", NULL, NULL},
};
static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)

View File

@ -170,6 +170,7 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
#define brai_tag MS_MAKE_TAG('b','r','a','i')
#define dsrt_tag MS_MAKE_TAG('d','s','r','t')
#define osma_tag MS_MAKE_TAG('o','s','m','a')
#define math_tag MS_MAKE_TAG('m','a','t','h')
static void test_ScriptItemize( void )
{
@ -446,6 +447,11 @@ static void test_ScriptItemize( void )
static const itemTest t461[2] = {{{0,0,0,0,0},0,0,0,0,osma_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0},16,0,0,0,-1,FALSE}};
static const itemTest t462[2] = {{{0,0,0,0,0},0,0,0,2,osma_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0},16,0,0,0,-1,FALSE}};
/* Mathematical Alphanumeric Symbols */
static const WCHAR test47[] = {0xd835,0xdc00,0xd835,0xdc35,0xd835,0xdc6a,0xd835,0xdc9f,0xd835,0xdcd4,0xd835,0xdd09,0xd835,0xdd3e,0xd835,0xdd73,0xd835,0xdda8,0xd835,0xdddd,0xd835,0xde12,0xd835,0xde47,0xd835,0xde7c};
static const itemTest t471[2] = {{{0,0,0,0,0},0,0,0,0,math_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0},26,0,0,0,-1,FALSE}};
static const itemTest t472[2] = {{{0,0,0,0,0},0,0,0,2,math_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0},26,0,0,0,-1,FALSE}};
SCRIPT_ITEM items[15];
SCRIPT_CONTROL Control;
SCRIPT_STATE State;
@ -525,6 +531,7 @@ static void test_ScriptItemize( void )
test_items_ok(test44,4,NULL,NULL,2,t441,FALSE,0);
test_items_ok(test45,24,NULL,NULL,1,t451,FALSE,0);
test_items_ok(test46,16,NULL,NULL,1,t461,FALSE,0);
test_items_ok(test47,26,NULL,NULL,1,t471,FALSE,0);
State.uBidiLevel = 0;
test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
@ -578,6 +585,7 @@ static void test_ScriptItemize( void )
test_items_ok(test44,4,&Control,&State,2,t441,FALSE,0);
test_items_ok(test45,24,&Control,&State,1,t451,FALSE,0);
test_items_ok(test46,16,&Control,&State,1,t461,FALSE,0);
test_items_ok(test47,26,&Control,&State,1,t471,FALSE,0);
State.uBidiLevel = 1;
test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
@ -631,6 +639,7 @@ static void test_ScriptItemize( void )
test_items_ok(test44,4,&Control,&State,2,t442,FALSE,0);
test_items_ok(test45,24,&Control,&State,1,t452,FALSE,0);
test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0);
test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0);
State.uBidiLevel = 1;
Control.fMergeNeutralItems = TRUE;
@ -685,6 +694,7 @@ static void test_ScriptItemize( void )
test_items_ok(test44,4,&Control,&State,2,t442,FALSE,0);
test_items_ok(test45,24,&Control,&State,1,t452,FALSE,0);
test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0);
test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0);
}
static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,

View File

@ -292,6 +292,8 @@ static const scriptRange scriptRanges[] = {
{ Script_Deseret, 0x10400, 0x1044F, 0, 0},
/* Osmanya: U+10480U+104AF */
{ Script_Osmanya, 0x10480, 0x104AF, Script_Osmanya_Numeric, 0},
/* Mathematical Alphanumeric Symbols: U+1D400U+1D7FF */
{ Script_MathAlpha, 0x1D400, 0x1D7FF, 0, 0},
/* END */
{ SCRIPT_UNDEFINED, 0, 0, 0}
};
@ -618,6 +620,10 @@ static const scriptData scriptInformation[] = {
{0, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
MS_MAKE_TAG('o','s','m','a'),
{'E','b','r','i','m','a'}},
{{Script_MathAlpha, 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('m','a','t','h'),
{'C','a','m','b','r','i','a',' ','M','a','t','h'}},
};
static const SCRIPT_PROPERTIES *script_props[] =
@ -660,7 +666,8 @@ static const SCRIPT_PROPERTIES *script_props[] =
&scriptInformation[70].props, &scriptInformation[71].props,
&scriptInformation[72].props, &scriptInformation[73].props,
&scriptInformation[74].props, &scriptInformation[75].props,
&scriptInformation[76].props, &scriptInformation[77].props
&scriptInformation[76].props, &scriptInformation[77].props,
&scriptInformation[78].props
};
typedef struct {

View File

@ -113,6 +113,8 @@
#define Script_Deseret 75
#define Script_Osmanya 76
#define Script_Osmanya_Numeric 77
/* Unicode Chapter 15 : Plane 1 */
#define Script_MathAlpha 78
#define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)