Commit 8222d4cd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Support more script ranges, up to Mongolian.

parent ba5cade7
......@@ -31,20 +31,37 @@ enum scriptcode {
Script_Arabic = 0,
Script_Armenian = 1,
Script_Bengali = 3,
Script_C1Controls = 12,
Script_Canadian = 8,
Script_Cherokee = 11,
Script_Controls = 12,
Script_Coptic = 13,
Script_Cyrillic = 16,
Script_Devanagari = 18,
Script_Ethiopic = 19,
Script_Georgian = 20,
Script_Greek = 23,
Script_Gujarati = 24,
Script_Gurmukhi = 25,
Script_Hangul = 27,
Script_Hebrew = 29,
Script_Kannada = 32,
Script_Khmer = 36,
Script_Lao = 37,
Script_Latin = 38,
Script_Malayalam = 44,
Script_Mongolian = 45,
Script_Myanmar = 46,
Script_NKo = 48,
Script_Ogham = 49,
Script_Oriya = 53,
Script_Runic = 58,
Script_Sinhala = 61,
Script_Syriac = 64,
Script_Tamil = 68,
Script_Telugu = 69,
Script_Thaana = 70,
Script_Thai = 71,
Script_Tibetan = 72,
Script_Symbol = 77,
Script_Unknown = (UINT16)-1
};
......@@ -70,7 +87,7 @@ static const struct script_range script_ranges[] = {
/* ASCII punctuation and symbols, control char DEL: U+007B–U+007F */
{ Script_Symbol, 0x7b, 0x7f },
/* C1 Controls: U+0080–U+009F */
{ Script_C1Controls, 0x80, 0x9f },
{ Script_Controls, 0x80, 0x9f },
/* Latin-1 Supplement: U+00A0–U+00FF */
/* Latin Extended-A: U+0100–U+017F */
/* Latin Extended-B: U+0180–U+024F */
......@@ -116,6 +133,41 @@ static const struct script_range script_ranges[] = {
{ Script_Oriya, 0xb00, 0xb7f },
/* Tamil: U+0B80–U+0BFF */
{ Script_Tamil, 0xb80, 0xbff },
/* Telugu: U+0C00–U+0C7F */
{ Script_Telugu, 0xc00, 0xc7f },
/* Kannada: U+0C80–U+0CFF */
{ Script_Kannada, 0xc80, 0xcff },
/* Malayalam: U+0D00–U+0D7F */
{ Script_Malayalam, 0xd00, 0xd7f },
/* Sinhala: U+0D80–U+0DFF */
{ Script_Sinhala, 0xd80, 0xdff },
/* Thai: U+0E00–U+0E7F */
{ Script_Thai, 0xe00, 0xe7f },
/* Lao: U+0E80–U+0EFF */
{ Script_Lao, 0xe80, 0xeff },
/* Tibetan: U+0F00–U+0FFF */
{ Script_Tibetan, 0xf00, 0xfff },
/* Myanmar: U+1000–U+109F */
{ Script_Myanmar, 0x1000, 0x109f },
/* Georgian: U+10A0–U+10FF */
{ Script_Georgian, 0x10a0, 0x10ff },
/* Hangul Jamo: U+1100–U+11FF */
{ Script_Hangul, 0x1100, 0x11ff },
/* Ethiopic: U+1200–U+137F */
/* Ethiopic Extensions: U+1380–U+139F */
{ Script_Ethiopic, 0x1200, 0x139f },
/* Cherokee: U+13A0–U+13FF */
{ Script_Cherokee, 0x13a0, 0x13ff },
/* Canadian Aboriginal Syllabics: U+1400–U+167F */
{ Script_Canadian, 0x1400, 0x167f },
/* Ogham: U+1680–U+169F */
{ Script_Ogham, 0x1680, 0x169f },
/* Runic: U+16A0–U+16F0 */
{ Script_Runic, 0x16a0, 0x16f0 },
/* Khmer: U+1780–U+17FF */
{ Script_Khmer, 0x1780, 0x17ff },
/* Mongolian: U+1800–U+18AF */
{ Script_Mongolian, 0x1800, 0x18af},
/* unsupported range */
{ Script_Unknown }
};
......
......@@ -400,20 +400,37 @@ enum scriptcode {
Script_Arabic = 0,
Script_Armenian = 1,
Script_Bengali = 3,
Script_C1Controls = 12,
Script_Canadian = 8,
Script_Cherokee = 11,
Script_Controls = 12,
Script_Coptic = 13,
Script_Cyrillic = 16,
Script_Devanagari = 18,
Script_Ethiopic = 19,
Script_Georgian = 20,
Script_Greek = 23,
Script_Gujarati = 24,
Script_Gurmukhi = 25,
Script_Hangul = 27,
Script_Hebrew = 29,
Script_Kannada = 32,
Script_Khmer = 36,
Script_Lao = 37,
Script_Latin = 38,
Script_Malayalam = 44,
Script_Mongolian = 45,
Script_Myanmar = 46,
Script_NKo = 48,
Script_Ogham = 49,
Script_Oriya = 53,
Script_Runic = 58,
Script_Sinhala = 61,
Script_Syriac = 64,
Script_Tamil = 68,
Script_Telugu = 69,
Script_Thaana = 70,
Script_Thai = 71,
Script_Tibetan = 72,
Script_Symbol = 77
};
......@@ -482,7 +499,7 @@ static struct sa_test sa_tests[] = {
{
/* C1 Controls, Latin-1 Supplement */
{0x80,0x90,0x9f,0xa0,0xc0,0xb8,0xbf,0xc0,0xff,0}, 2,
{ { 0, 3, { Script_C1Controls, DWRITE_SCRIPT_SHAPES_DEFAULT } },
{ { 0, 3, { Script_Controls, DWRITE_SCRIPT_SHAPES_DEFAULT } },
{ 3, 6, { Script_Latin, DWRITE_SCRIPT_SHAPES_DEFAULT } },
}
},
......@@ -596,6 +613,95 @@ static struct sa_test sa_tests[] = {
{0xba4,0xbae,0xbbf,0xbb4,0xbcd,'.',0}, 1,
{ { 0, 6, { Script_Tamil, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Telugu */
{0xc24,0xc46,0xc32,0xc41,0xc17,0xc41,'.',0}, 1,
{ { 0, 7, { Script_Telugu, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Kannada */
{0xc95,0xca8,0xccd,0xca8,0xca1,'.',0}, 1,
{ { 0, 6, { Script_Kannada, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Malayalam */
{0xd2e,0xd32,0xd2f,0xd3e,0xd33,0xd02,'.',0}, 1,
{ { 0, 7, { Script_Malayalam, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Sinhala */
{0xd82,0xd85,0xd9a,0xdcf,'.',0}, 1,
{ { 0, 5, { Script_Sinhala, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Thai */
{0x0e04,0x0e27,0x0e32,0x0e21,0x0e1e,0x0e22,0x0e32,0x0e22,0x0e32,0x0e21,
0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e44,0x0e2b,0x0e19,
0x0e04,0x0e27,0x0e32,0x0e21,0x0e2a, 0x0e33,0x0e40,0x0e23,0x0e47,0x0e08,
0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e19,0x0e31,0x0e48,0x0e19,'.',0}, 1,
{ { 0, 42, { Script_Thai, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Lao */
{0xead,0xeb1,0xe81,0xeaa,0xead,0xe99,0xea5,0xeb2,0xea7,'.',0}, 1,
{ { 0, 10, { Script_Lao, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Tibetan */
{0xf04,0xf05,0xf0e,0x020,0xf51,0xf7c,0xf53,0xf0b,0xf5a,0xf53,0xf0b,
0xf51,0xf44,0xf0b,0xf54,0xf7c,0xf0d,'.',0}, 1,
{ { 0, 18, { Script_Tibetan, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Myanmar */
{0x1019,0x103c,0x1014,0x103a,0x1019,0x102c,0x1021,0x1000,0x1039,0x1001,0x101b,0x102c,'.',0}, 1,
{ { 0, 13, { Script_Myanmar, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Georgian */
{0x10a0,0x10d0,0x10da,0x10f1,0x10fb,'.',0}, 1,
{ { 0, 6, { Script_Georgian, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Hangul */
{0x1100,0x1110,0x1160,0x1170,0x11a8,'.',0}, 1,
{ { 0, 6, { Script_Hangul, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Ethiopic */
{0x130d,0x12d5,0x12dd,0}, 1,
{ { 0, 3, { Script_Ethiopic, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Cherokee */
{0x13e3,0x13b3,0x13a9,0x0020,0x13a6,0x13ec,0x13c2,0x13af,0x13cd,0x13d7,0}, 1,
{ { 0, 10, { Script_Cherokee, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Canadian */
{0x1403,0x14c4,0x1483,0x144e,0x1450,0x1466,0}, 1,
{ { 0, 6, { Script_Canadian, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Ogham */
{0x169b,0x1691,0x168c,0x1690,0x168b,0x169c,0}, 1,
{ { 0, 6, { Script_Ogham, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Runic */
{0x16a0,0x16a1,0x16a2,0x16a3,0x16a4,0x16a5,0}, 1,
{ { 0, 6, { Script_Runic, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Khmer */
{0x1781,0x17c1,0x1798,0x179a,0x1797,0x17b6,0x179f,0x17b6,0}, 1,
{ { 0, 8, { Script_Khmer, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
{
/* Mongolian */
{0x182e,0x1823,0x1829,0x182d,0x1823,0x182f,0x0020,0x182a,0x1822,0x1834,0x1822,0x182d,0x180c,0}, 1,
{ { 0, 13, { Script_Mongolian, DWRITE_SCRIPT_SHAPES_DEFAULT } }}
},
/* keep this as end marker */
{ {0} }
};
......
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