Commit 9097226a authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Itemize numbers outside of the basic ascii set in a seperate script.

parent 2fe60ff6
...@@ -584,6 +584,7 @@ static const ScriptShapeData ShapingData[] = ...@@ -584,6 +584,7 @@ static const ScriptShapeData ShapingData[] =
{{ devanagari_features, 6}, required_telugu_features, "mlym", "mlm2", ContextualShape_Malayalam, ShapeCharGlyphProp_Malayalam}, {{ devanagari_features, 6}, required_telugu_features, "mlym", "mlm2", ContextualShape_Malayalam, ShapeCharGlyphProp_Malayalam},
{{ standard_features, 2}, NULL, "" , "", NULL, NULL}, {{ standard_features, 2}, NULL, "" , "", NULL, NULL},
{{ standard_features, 2}, NULL, "latn" , "", NULL, NULL}, {{ standard_features, 2}, NULL, "latn" , "", NULL, NULL},
{{ standard_features, 2}, NULL, "" , "", NULL, NULL},
}; };
static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph) static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
......
...@@ -291,6 +291,11 @@ static void test_ScriptItemize( void ) ...@@ -291,6 +291,11 @@ static void test_ScriptItemize( void )
static const itemTest t222[3] = {{{0,0,0,0,0},0,1,1,1,latn_tag,FALSE},{{0,0,0,0,0},3,1,1,1,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; static const itemTest t222[3] = {{{0,0,0,0,0},0,1,1,1,latn_tag,FALSE},{{0,0,0,0,0},3,1,1,1,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}};
static const itemTest t223[2] = {{{0,0,0,0,0},0,1,1,1,latn_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; static const itemTest t223[2] = {{{0,0,0,0,0},0,1,1,1,latn_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}};
/* Number 2*/
static const WCHAR test23[] = {'1','2','3',0x00b2,0x00b3,0x2070,0};
static const itemTest t231[3] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}};
static const itemTest t232[3] = {{{0,0,0,0,0},0,0,1,2,0,FALSE},{{0,0,0,0,0},3,0,1,2,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}};
SCRIPT_ITEM items[15]; SCRIPT_ITEM items[15];
SCRIPT_CONTROL Control; SCRIPT_CONTROL Control;
...@@ -347,6 +352,7 @@ static void test_ScriptItemize( void ) ...@@ -347,6 +352,7 @@ static void test_ScriptItemize( void )
test_items_ok(test20,5,NULL,NULL,2,t201,FALSE,0); test_items_ok(test20,5,NULL,NULL,2,t201,FALSE,0);
test_items_ok(test21,5,NULL,NULL,1,t211,FALSE,0); test_items_ok(test21,5,NULL,NULL,1,t211,FALSE,0);
test_items_ok(test22,6,NULL,NULL,2,t221,FALSE,0); test_items_ok(test22,6,NULL,NULL,2,t221,FALSE,0);
test_items_ok(test23,6,NULL,NULL,2,t231,FALSE,0);
State.uBidiLevel = 0; State.uBidiLevel = 0;
test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0); test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
...@@ -376,6 +382,7 @@ static void test_ScriptItemize( void ) ...@@ -376,6 +382,7 @@ static void test_ScriptItemize( void )
test_items_ok(test20,5,&Control,&State,2,t201,FALSE,0); test_items_ok(test20,5,&Control,&State,2,t201,FALSE,0);
test_items_ok(test21,5,&Control,&State,1,t211,FALSE,0); test_items_ok(test21,5,&Control,&State,1,t211,FALSE,0);
test_items_ok(test22,6,&Control,&State,2,t221,FALSE,0); test_items_ok(test22,6,&Control,&State,2,t221,FALSE,0);
test_items_ok(test23,6,&Control,&State,2,t231,FALSE,0);
State.uBidiLevel = 1; State.uBidiLevel = 1;
test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0); test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
...@@ -405,6 +412,7 @@ static void test_ScriptItemize( void ) ...@@ -405,6 +412,7 @@ static void test_ScriptItemize( void )
test_items_ok(test20,5,&Control,&State,2,t202,FALSE,0); test_items_ok(test20,5,&Control,&State,2,t202,FALSE,0);
test_items_ok(test21,5,&Control,&State,1,t211,FALSE,0); test_items_ok(test21,5,&Control,&State,1,t211,FALSE,0);
test_items_ok(test22,6,&Control,&State,2,t222,FALSE,1); test_items_ok(test22,6,&Control,&State,2,t222,FALSE,1);
test_items_ok(test23,6,&Control,&State,2,t232,FALSE,0);
State.uBidiLevel = 1; State.uBidiLevel = 1;
Control.fMergeNeutralItems = TRUE; Control.fMergeNeutralItems = TRUE;
...@@ -435,6 +443,7 @@ static void test_ScriptItemize( void ) ...@@ -435,6 +443,7 @@ static void test_ScriptItemize( void )
test_items_ok(test20,5,&Control,&State,2,t202,FALSE,0); test_items_ok(test20,5,&Control,&State,2,t202,FALSE,0);
test_items_ok(test21,5,&Control,&State,1,t211,FALSE,0); test_items_ok(test21,5,&Control,&State,1,t211,FALSE,0);
test_items_ok(test22,6,&Control,&State,1,t223,FALSE,2); test_items_ok(test22,6,&Control,&State,1,t223,FALSE,2);
test_items_ok(test23,6,&Control,&State,2,t232,FALSE,0);
} }
static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string, static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
......
...@@ -52,11 +52,12 @@ typedef struct _scriptRange ...@@ -52,11 +52,12 @@ typedef struct _scriptRange
static const scriptRange scriptRanges[] = { static const scriptRange scriptRanges[] = {
/* Basic Latin: U+0000–U+007A */ /* Basic Latin: U+0000–U+007A */
{ Script_Latin, 0x00, 0x07a , Script_Numeric, Script_Punctuation},
/* Latin-1 Supplement: U+0080–U+00FF */ /* Latin-1 Supplement: U+0080–U+00FF */
/* Latin Extended-A: U+0100–U+017F */ /* Latin Extended-A: U+0100–U+017F */
/* Latin Extended-B: U+0180–U+024F */ /* Latin Extended-B: U+0180–U+024F */
/* IPA Extensions: U+0250–U+02AF */ /* IPA Extensions: U+0250–U+02AF */
{ Script_Latin, 0x00, 0x2af , Script_Numeric, Script_Punctuation}, { Script_Latin, 0x80, 0x2af , Script_Numeric2, Script_Punctuation},
/* Combining Diacritical Marks : U+0300–U+036F */ /* Combining Diacritical Marks : U+0300–U+036F */
{ Script_Diacritical,0x300, 0x36f, 0, 0}, { Script_Diacritical,0x300, 0x36f, 0, 0},
/* Greek: U+0370–U+03FF */ /* Greek: U+0370–U+03FF */
...@@ -119,9 +120,15 @@ static const scriptRange scriptRanges[] = { ...@@ -119,9 +120,15 @@ static const scriptRange scriptRanges[] = {
/* Greek Extended: U+1F00–U+1FFF */ /* Greek Extended: U+1F00–U+1FFF */
{ Script_Greek, 0x1f00, 0x1fff, 0, 0}, { Script_Greek, 0x1f00, 0x1fff, 0, 0},
/* General Punctuation: U+2000 –U+206f */ /* General Punctuation: U+2000 –U+206f */
{ Script_Latin, 0x2000, 0x206f, 0, 0},
/* Superscripts and Subscripts : U+2070 –U+209f */ /* Superscripts and Subscripts : U+2070 –U+209f */
/* Currency Symbols : U+20a0 –U+20cf */ /* Currency Symbols : U+20a0 –U+20cf */
{ Script_Latin, 0x2000, 0x20cf, 0, 0}, { Script_Numeric2, 0x2070, 0x2070, 0, 0},
{ Script_Latin, 0x2071, 0x2073, 0, 0},
{ Script_Numeric2, 0x2074, 0x2079, 0, 0},
{ Script_Latin, 0x207a, 0x207f, 0, 0},
{ Script_Numeric2, 0x2080, 0x2089, 0, 0},
{ Script_Latin, 0x208a, 0x20cf, 0, 0},
/* Letterlike Symbols : U+2100 –U+214f */ /* Letterlike Symbols : U+2100 –U+214f */
/* Number Forms : U+2150 –U+218f */ /* Number Forms : U+2150 –U+218f */
/* Arrows : U+2190 –U+21ff */ /* Arrows : U+2190 –U+21ff */
...@@ -366,6 +373,10 @@ static const scriptData scriptInformation[] = { ...@@ -366,6 +373,10 @@ static const scriptData scriptInformation[] = {
{LANG_ENGLISH, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {LANG_ENGLISH, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
MS_MAKE_TAG('l','a','t','n'), MS_MAKE_TAG('l','a','t','n'),
{0}}, {0}},
{{Script_Numeric2, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
{LANG_ENGLISH, 1, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0},
0x00000000,
{0}},
}; };
static const SCRIPT_PROPERTIES *script_props[] = static const SCRIPT_PROPERTIES *script_props[] =
...@@ -392,7 +403,7 @@ static const SCRIPT_PROPERTIES *script_props[] = ...@@ -392,7 +403,7 @@ static const SCRIPT_PROPERTIES *script_props[] =
&scriptInformation[38].props, &scriptInformation[39].props, &scriptInformation[38].props, &scriptInformation[39].props,
&scriptInformation[40].props, &scriptInformation[41].props, &scriptInformation[40].props, &scriptInformation[41].props,
&scriptInformation[42].props, &scriptInformation[43].props, &scriptInformation[42].props, &scriptInformation[43].props,
&scriptInformation[44].props &scriptInformation[44].props, &scriptInformation[45].props
}; };
typedef struct { typedef struct {
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
/* More supplemental */ /* More supplemental */
#define Script_Diacritical 44 #define Script_Diacritical 44
#define Script_Punctuation2 45 #define Script_Punctuation2 45
#define Script_Numeric2 46
#define GLYPH_BLOCK_SHIFT 8 #define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT) #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