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

This commit is contained in:
Aric Stewart 2011-11-20 21:05:45 -07:00 committed by Alexandre Julliard
parent 2fe60ff696
commit 9097226a3c
4 changed files with 25 additions and 3 deletions

View file

@ -584,6 +584,7 @@ static const ScriptShapeData ShapingData[] =
{{ devanagari_features, 6}, required_telugu_features, "mlym", "mlm2", ContextualShape_Malayalam, ShapeCharGlyphProp_Malayalam},
{{ standard_features, 2}, NULL, "" , "", 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)

View file

@ -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 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_CONTROL Control;
@ -347,6 +352,7 @@ static void test_ScriptItemize( void )
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(test22,6,NULL,NULL,2,t221,FALSE,0);
test_items_ok(test23,6,NULL,NULL,2,t231,FALSE,0);
State.uBidiLevel = 0;
test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
@ -376,6 +382,7 @@ static void test_ScriptItemize( void )
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(test22,6,&Control,&State,2,t221,FALSE,0);
test_items_ok(test23,6,&Control,&State,2,t231,FALSE,0);
State.uBidiLevel = 1;
test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
@ -405,6 +412,7 @@ static void test_ScriptItemize( void )
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(test22,6,&Control,&State,2,t222,FALSE,1);
test_items_ok(test23,6,&Control,&State,2,t232,FALSE,0);
State.uBidiLevel = 1;
Control.fMergeNeutralItems = TRUE;
@ -435,6 +443,7 @@ static void test_ScriptItemize( void )
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(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,

View file

@ -52,11 +52,12 @@ typedef struct _scriptRange
static const scriptRange scriptRanges[] = {
/* Basic Latin: U+0000U+007A */
{ Script_Latin, 0x00, 0x07a , Script_Numeric, Script_Punctuation},
/* Latin-1 Supplement: U+0080U+00FF */
/* Latin Extended-A: U+0100U+017F */
/* Latin Extended-B: U+0180U+024F */
/* IPA Extensions: U+0250U+02AF */
{ Script_Latin, 0x00, 0x2af , Script_Numeric, Script_Punctuation},
{ Script_Latin, 0x80, 0x2af , Script_Numeric2, Script_Punctuation},
/* Combining Diacritical Marks : U+0300U+036F */
{ Script_Diacritical,0x300, 0x36f, 0, 0},
/* Greek: U+0370U+03FF */
@ -119,9 +120,15 @@ static const scriptRange scriptRanges[] = {
/* Greek Extended: U+1F00U+1FFF */
{ Script_Greek, 0x1f00, 0x1fff, 0, 0},
/* General Punctuation: U+2000 U+206f */
{ Script_Latin, 0x2000, 0x206f, 0, 0},
/* Superscripts and Subscripts : U+2070 U+209f */
/* 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 */
/* Number Forms : U+2150 U+218f */
/* Arrows : U+2190 U+21ff */
@ -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},
MS_MAKE_TAG('l','a','t','n'),
{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[] =
@ -392,7 +403,7 @@ static const SCRIPT_PROPERTIES *script_props[] =
&scriptInformation[38].props, &scriptInformation[39].props,
&scriptInformation[40].props, &scriptInformation[41].props,
&scriptInformation[42].props, &scriptInformation[43].props,
&scriptInformation[44].props
&scriptInformation[44].props, &scriptInformation[45].props
};
typedef struct {

View file

@ -74,6 +74,7 @@
/* More supplemental */
#define Script_Diacritical 44
#define Script_Punctuation2 45
#define Script_Numeric2 46
#define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)