usp10: Add currency scripts to match windows.

This commit is contained in:
Aric Stewart 2011-12-22 13:05:11 -06:00 committed by Alexandre Julliard
parent 70fe8d5266
commit 91e0f56c05
3 changed files with 33 additions and 1 deletions

View File

@ -715,6 +715,9 @@ static const ScriptShapeData ShapingData[] =
{{ no_features, 0}, NULL, "osma", "", NULL, NULL}, {{ no_features, 0}, NULL, "osma", "", NULL, NULL},
{{ no_features, 0}, NULL, "osma", "", NULL, NULL}, {{ no_features, 0}, NULL, "osma", "", NULL, NULL},
{{ no_features, 0}, NULL, "math", "", NULL, NULL}, {{ no_features, 0}, NULL, "math", "", NULL, NULL},
{{ hebrew_features, 1}, NULL, "hebr", "", NULL, NULL},
{{ latin_features, 2}, NULL, "latn" , "", NULL, NULL},
{{ thai_features, 1}, NULL, "thai", "", NULL, ShapeCharGlyphProp_Thai},
}; };
static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph) static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)

View File

@ -624,6 +624,18 @@ static const scriptData scriptInformation[] = {
{0, 0, 1, 0, 0, DEFAULT_CHARSET, 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'), MS_MAKE_TAG('m','a','t','h'),
{'C','a','m','b','r','i','a',' ','M','a','t','h'}}, {'C','a','m','b','r','i','a',' ','M','a','t','h'}},
{{Script_Hebrew_Currency, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
{LANG_HEBREW, 0, 1, 0, 0, HEBREW_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
MS_MAKE_TAG('h','e','b','r'),
{'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}},
{{Script_Vietnamese_Currency, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
{LANG_VIETNAMESE, 0, 0, 0, 0, VIETNAMESE_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
MS_MAKE_TAG('l','a','t','n'),
{0}},
{{Script_Thai_Currency, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}},
{LANG_THAI, 0, 1, 0, 0, THAI_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0},
MS_MAKE_TAG('t','h','a','i'),
{'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}},
}; };
static const SCRIPT_PROPERTIES *script_props[] = static const SCRIPT_PROPERTIES *script_props[] =
@ -667,7 +679,8 @@ static const SCRIPT_PROPERTIES *script_props[] =
&scriptInformation[72].props, &scriptInformation[73].props, &scriptInformation[72].props, &scriptInformation[73].props,
&scriptInformation[74].props, &scriptInformation[75].props, &scriptInformation[74].props, &scriptInformation[75].props,
&scriptInformation[76].props, &scriptInformation[77].props, &scriptInformation[76].props, &scriptInformation[77].props,
&scriptInformation[78].props &scriptInformation[78].props, &scriptInformation[79].props,
&scriptInformation[80].props, &scriptInformation[81].props
}; };
typedef struct { typedef struct {
@ -830,6 +843,18 @@ static WORD get_char_script( LPCWSTR str, INT index, INT end, INT *consumed)
if (str[index] == 0x2212 || str[index] == 0x2044) if (str[index] == 0x2212 || str[index] == 0x2044)
return Script_Punctuation; return Script_Punctuation;
/* Currency Symboles by Unicode point */
switch (str[index])
{
case 0x09f2:
case 0x09f3: return Script_Bengali_Currency;
case 0x0af1: return Script_Gujarati_Currency;
case 0x0e3f: return Script_Thai_Currency;
case 0x20aa: return Script_Hebrew_Currency;
case 0x20ab: return Script_Vietnamese_Currency;
case 0xfb29: return Script_Hebrew_Currency;
}
GetStringTypeW(CT_CTYPE1, &str[index], 1, &type); GetStringTypeW(CT_CTYPE1, &str[index], 1, &type);
if (type == 0) if (type == 0)

View File

@ -115,6 +115,10 @@
#define Script_Osmanya_Numeric 77 #define Script_Osmanya_Numeric 77
/* Unicode Chapter 15 : Plane 1 */ /* Unicode Chapter 15 : Plane 1 */
#define Script_MathAlpha 78 #define Script_MathAlpha 78
/* Additional Currency Scripts */
#define Script_Hebrew_Currency 79
#define Script_Vietnamese_Currency 80
#define Script_Thai_Currency 81
#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)