dwrite: Improve script mapping generation.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-07-04 10:44:47 +03:00 committed by Alexandre Julliard
parent 65feea4e5a
commit c38be91061
4 changed files with 1044 additions and 912 deletions

View File

@ -45,18 +45,14 @@ struct dwritescript_properties {
static const struct dwritescript_properties dwritescripts_properties[Script_LastId+1] = {
{ /* Zzzz */ { 0x7a7a7a5a, 999, 15, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Zyyy */ { 0x7979795a, 998, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 } },
{ /* Adlm */ { 0x6d6c6441, 166, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 } },
{ /* Ahom */ { 0x6d6f6841, 338, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Hluw */ { 0x77756c48, 80, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Zinh */ { 0x686e695a, 994, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 } },
{ /* Arab */ { 0x62617241, 160, 8, 0x0640, 0, 1, 0, 0, 0, 1, 1 }, _OT('a','r','a','b'), 0, TRUE },
{ /* Armn */ { 0x6e6d7241, 230, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('a','r','m','n') },
{ /* Avst */ { 0x74737641, 134, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('a','v','s','t') },
{ /* Bali */ { 0x696c6142, 360, 15, 0x0020, 1, 0, 1, 0, 0, 0, 0 }, _OT('b','a','l','i') },
{ /* Bamu */ { 0x756d6142, 435, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('b','a','m','u') },
{ /* Bass */ { 0x73736142, 259, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Batk */ { 0x6b746142, 365, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('b','a','t','k') },
{ /* Beng */ { 0x676e6542, 325, 15, 0x0020, 1, 1, 0, 0, 0, 1, 0 }, _OT('b','e','n','g'), _OT('b','n','g','2'), TRUE },
{ /* Bhks */ { 0x736b6842, 334, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 } },
{ /* Bopo */ { 0x6f706f42, 285, 1, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('b','o','p','o') },
{ /* Brah */ { 0x68617242, 300, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('b','r','a','h') },
{ /* Brai */ { 0x69617242, 570, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('b','r','a','i'), 0, TRUE },
@ -64,8 +60,6 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
{ /* Buhd */ { 0x64687542, 372, 8, 0x0020, 0, 0, 1, 0, 0, 0, 0 }, _OT('b','u','h','d') },
{ /* Cans */ { 0x736e6143, 440, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('c','a','n','s'), 0, TRUE },
{ /* Cari */ { 0x69726143, 201, 1, 0x0020, 0, 0, 1, 0, 0, 0, 0 }, _OT('c','a','r','i') },
{ /* Aghb */ { 0x62686741, 239, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Cakm */ { 0x6d6b6143, 349, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('c','a','k','m') },
{ /* Cham */ { 0x6d616843, 358, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('c','h','a','m') },
{ /* Cher */ { 0x72656843, 445, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('c','h','e','r'), 0, TRUE },
{ /* Copt */ { 0x74706f43, 204, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('c','o','p','t') },
@ -74,21 +68,17 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
{ /* Cyrl */ { 0x6c727943, 220, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('c','y','r','l') },
{ /* Dsrt */ { 0x74727344, 250, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('d','s','r','t'), 0, TRUE },
{ /* Deva */ { 0x61766544, 315, 15, 0x0020, 1, 1, 0, 0, 0, 1, 0 }, _OT('d','e','v','a'), _OT('d','e','v','2'), TRUE },
{ /* Dupl */ { 0x6c707544, 755, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Egyp */ { 0x70796745, 50, 1, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('e','g','y','p') },
{ /* Elba */ { 0x61626c45, 226, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Ethi */ { 0x69687445, 430, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('e','t','h','i'), 0, TRUE },
{ /* Geor */ { 0x726f6547, 240, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('g','e','o','r') },
{ /* Glag */ { 0x67616c47, 225, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('g','l','a','g') },
{ /* Goth */ { 0x68746f47, 206, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('g','o','t','h') },
{ /* Gran */ { 0x6e617247, 343, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Grek */ { 0x6b657247, 200, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('g','r','e','k') },
{ /* Gujr */ { 0x726a7547, 320, 15, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('g','u','j','r'), _OT('g','j','r','2'), TRUE },
{ /* Guru */ { 0x75727547, 310, 15, 0x0020, 1, 1, 0, 0, 0, 1, 0 }, _OT('g','u','r','u'), _OT('g','u','r','2'), TRUE },
{ /* Hani */ { 0x696e6148, 500, 8, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('h','a','n','i') },
{ /* Hang */ { 0x676e6148, 286, 8, 0x0020, 1, 1, 1, 1, 0, 0, 0 }, _OT('h','a','n','g'), 0, TRUE },
{ /* Hano */ { 0x6f6e6148, 371, 8, 0x0020, 0, 0, 1, 0, 0, 0, 0 }, _OT('h','a','n','o') },
{ /* Hatr */ { 0x72746148, 127, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Hebr */ { 0x72626548, 125, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('h','e','b','r'), 0, TRUE },
{ /* Hira */ { 0x61726948, 410, 8, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('k','a','n','a') },
{ /* Armi */ { 0x696d7241, 124, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('a','r','m','i') },
@ -101,64 +91,37 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
{ /* Kali */ { 0x696c614b, 357, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('k','a','l','i') },
{ /* Khar */ { 0x7261684b, 305, 15, 0x0020, 1, 0, 1, 0, 0, 0, 0 }, _OT('k','h','a','r') },
{ /* Khmr */ { 0x726d684b, 355, 8, 0x0020, 1, 0, 1, 0, 1, 0, 0 }, _OT('k','h','m','r'), 0, TRUE },
{ /* Khoj */ { 0x6a6f684b, 322, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Sind */ { 0x646e6953, 318, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Laoo */ { 0x6f6f614c, 356, 8, 0x0020, 1, 0, 1, 0, 1, 0, 0 }, _OT('l','a','o',' '), 0, TRUE },
{ /* Latn */ { 0x6e74614c, 215, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('l','a','t','n'), 0, FALSE, &latn_shaping_ops },
{ /* Lepc */ { 0x6370654c, 335, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('l','e','p','c') },
{ /* Limb */ { 0x626d694c, 336, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('l','i','m','b') },
{ /* Lina */ { 0x616e694c, 400, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Linb */ { 0x626e694c, 401, 1, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('l','i','n','b') },
{ /* Lisu */ { 0x7573694c, 399, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('l','i','s','u') },
{ /* Lyci */ { 0x6963794c, 202, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('l','y','c','i') },
{ /* Lydi */ { 0x6964794c, 116, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('l','y','d','i') },
{ /* Mahj */ { 0x6a68614d, 314, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mlym */ { 0x6d796c4d, 347, 15, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('m','l','y','m'), _OT('m','l','m','2'), TRUE },
{ /* Mand */ { 0x646e614d, 140, 8, 0x0640, 0, 1, 0, 0, 0, 1, 1 }, _OT('m','a','n','d') },
{ /* Mani */ { 0x696e614d, 139, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Marc */ { 0x6372614d, 332, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mtei */ { 0x6965744d, 337, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('m','t','e','i') },
{ /* Mend */ { 0x646e654d, 438, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Merc */ { 0x6372654d, 101, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('m','e','r','c') },
{ /* Mero */ { 0x6f72654d, 100, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('m','e','r','o') },
{ /* Plrd */ { 0x64726c50, 282, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Modi */ { 0x69646f4d, 324, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mong */ { 0x676e6f4d, 145, 8, 0x0020, 0, 1, 0, 0, 0, 1, 1 }, _OT('m','o','n','g'), 0, TRUE },
{ /* Mroo */ { 0x6f6f724d, 199, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mult */ { 0x746c754d, 323, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mymr */ { 0x726d794d, 350, 15, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('m','y','m','r'), 0, TRUE },
{ /* Nbat */ { 0x7461624e, 159, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Talu */ { 0x756c6154, 354, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('t','a','l','u'), 0, TRUE },
{ /* Newa */ { 0x6177654e, 333, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Nkoo */ { 0x6f6f6b4e, 165, 8, 0x0020, 0, 1, 0, 0, 0, 1, 1 }, _OT('n','k','o',' '), 0, TRUE },
{ /* Ogam */ { 0x6d61674f, 212, 1, 0x1680, 0, 1, 0, 0, 0, 1, 0 }, _OT('o','g','a','m'), 0, TRUE },
{ /* Olck */ { 0x6b636c4f, 261, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('o','l','c','k') },
{ /* Hung */ { 0x676e7548, 176, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Ital */ { 0x6c617449, 210, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('i','t','a','l') },
{ /* Narb */ { 0x6272614e, 106, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Perm */ { 0x6d726550, 227, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Xpeo */ { 0x6f657058, 30, 1, 0x0020, 0, 1, 1, 1, 0, 0, 0 }, _OT('x','p','e','o'), 0, TRUE },
{ /* Sarb */ { 0x62726153, 105, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('s','a','r','b') },
{ /* Orkh */ { 0x686b724f, 175, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('o','r','k','h') },
{ /* Orya */ { 0x6179724f, 327, 15, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('o','r','y','a'), _OT('o','r','y','2'), TRUE },
{ /* Osge */ { 0x6567734f, 219, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Osma */ { 0x616d734f, 260, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('o','s','m','a'), 0, TRUE },
{ /* Hmng */ { 0x676e6d48, 450, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Palm */ { 0x6d6c6150, 126, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Pauc */ { 0x63756150, 263, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Phag */ { 0x67616850, 331, 8, 0x0020, 0, 1, 0, 0, 0, 1, 1 }, _OT('p','h','a','g'), 0, TRUE },
{ /* Phnx */ { 0x786e6850, 115, 1, 0x0020, 0, 0, 1, 0, 0, 0, 0 }, _OT('p','h','n','x') },
{ /* Phlp */ { 0x706c6850, 132, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Rjng */ { 0x676e6a52, 363, 8, 0x0020, 1, 0, 1, 0, 0, 0, 0 }, _OT('r','j','n','g') },
{ /* Runr */ { 0x726e7552, 211, 1, 0x0020, 0, 0, 1, 0, 0, 0, 0 }, _OT('r','u','n','r'), 0, TRUE },
{ /* Samr */ { 0x726d6153, 123, 8, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('s','a','m','r') },
{ /* Saur */ { 0x72756153, 344, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('s','a','u','r') },
{ /* Shrd */ { 0x64726853, 319, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('s','h','r','d') },
{ /* Shaw */ { 0x77616853, 281, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('s','h','a','w') },
{ /* Sidd */ { 0x64646953, 302, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Sgnw */ { 0x776e6753, 95, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Sinh */ { 0x686e6953, 348, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('s','i','n','h'), 0, TRUE },
{ /* Sora */ { 0x61726f53, 398, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('s','o','r','a') },
{ /* Sund */ { 0x646e7553, 362, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('s','u','n','d') },
{ /* Sylo */ { 0x6f6c7953, 316, 8, 0x0020, 1, 1, 0, 0, 0, 1, 0 }, _OT('s','y','l','o') },
{ /* Syrc */ { 0x63727953, 135, 8, 0x0640, 0, 1, 0, 0, 0, 1, 1 }, _OT('s','y','r','c'), 0, TRUE },
@ -167,19 +130,45 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
{ /* Tale */ { 0x656c6154, 353, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('t','a','l','e'), 0, TRUE },
{ /* Lana */ { 0x616e614c, 351, 8, 0x0020, 1, 0, 1, 0, 0, 0, 0 }, _OT('l','a','n','a') },
{ /* Tavt */ { 0x74766154, 359, 8, 0x0020, 1, 0, 1, 0, 1, 0, 0 }, _OT('t','a','v','t') },
{ /* Takr */ { 0x726b6154, 321, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('t','a','k','r') },
{ /* Taml */ { 0x6c6d6154, 346, 15, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('t','a','m','l'), _OT('t','m','l','2'), TRUE },
{ /* Tang */ { 0x676e6154, 520, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Telu */ { 0x756c6554, 340, 15, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('t','e','l','u'), _OT('t','e','l','2'), TRUE },
{ /* Thaa */ { 0x61616854, 170, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('t','h','a','a'), 0, TRUE },
{ /* Thai */ { 0x69616854, 352, 8, 0x0020, 1, 0, 1, 0, 1, 0, 0 }, _OT('t','h','a','i'), 0, TRUE },
{ /* Tibt */ { 0x74626954, 330, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('t','i','b','t'), 0, TRUE },
{ /* Tfng */ { 0x676e6654, 120, 8, 0x0020, 1, 1, 1, 0, 0, 0, 0 }, _OT('t','f','n','g'), 0, TRUE },
{ /* Tirh */ { 0x68726954, 326, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Ugar */ { 0x72616755, 40, 1, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('u','g','a','r') },
{ /* Vaii */ { 0x69696156, 470, 1, 0x0020, 0, 1, 1, 0, 0, 0, 0 }, _OT('v','a','i',' '), 0, TRUE },
{ /* Yiii */ { 0x69696959, 460, 1, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('y','i',' ',' '), 0, TRUE },
{ /* Cakm */ { 0x6d6b6143, 349, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('c','a','k','m') },
{ /* Merc */ { 0x6372654d, 101, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('m','e','r','c') },
{ /* Mero */ { 0x6f72654d, 100, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('m','e','r','o') },
{ /* Plrd */ { 0x64726c50, 282, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Shrd */ { 0x64726853, 319, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('s','h','r','d') },
{ /* Sora */ { 0x61726f53, 398, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('s','o','r','a') },
{ /* Takr */ { 0x726b6154, 321, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 }, _OT('t','a','k','r') },
{ /* Bass */ { 0x73736142, 259, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Aghb */ { 0x62686741, 239, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Dupl */ { 0x6c707544, 755, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Elba */ { 0x61626c45, 226, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Gran */ { 0x6e617247, 343, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Khoj */ { 0x6a6f684b, 322, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Sind */ { 0x646e6953, 318, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Lina */ { 0x616e694c, 400, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mahj */ { 0x6a68614d, 314, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mani */ { 0x696e614d, 139, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mend */ { 0x646e654d, 438, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Modi */ { 0x69646f4d, 324, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Mroo */ { 0x6f6f724d, 199, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Nbat */ { 0x7461624e, 159, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Narb */ { 0x6272614e, 106, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Perm */ { 0x6d726550, 227, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Hmng */ { 0x676e6d48, 450, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Palm */ { 0x6d6c6150, 126, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Pauc */ { 0x63756150, 263, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Phlp */ { 0x706c6850, 132, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Sidd */ { 0x64646953, 302, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Tirh */ { 0x68726954, 326, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Wara */ { 0x61726157, 262, 1, 0x0020, 0, 0, 0, 0, 0, 0, 0 } },
{ /* Yiii */ { 0x69696959, 460, 1, 0x0020, 0, 0, 1, 1, 0, 0, 0 }, _OT('y','i',' ',' '), 0, TRUE }
};
#undef _OT
@ -241,7 +230,8 @@ static inline UINT32 decode_surrogate_pair(const WCHAR *str, UINT32 index, UINT3
static inline UINT16 get_char_script(WCHAR c)
{
return get_table_entry(wine_scripts_table, c);
UINT16 script = get_table_entry(wine_scripts_table, c);
return script == Script_Inherited ? Script_Unknown : script;
}
static DWRITE_SCRIPT_ANALYSIS get_char_sa(WCHAR c)

File diff suppressed because it is too large Load Diff

View File

@ -5,140 +5,129 @@
enum unicode_script_id {
Script_Unknown = 0,
Script_Common = 1,
Script_Adlam = 2,
Script_Ahom = 3,
Script_Anatolian_Hieroglyphs = 4,
Script_Arabic = 5,
Script_Armenian = 6,
Script_Avestan = 7,
Script_Balinese = 8,
Script_Bamum = 9,
Script_Bassa_Vah = 10,
Script_Batak = 11,
Script_Bengali = 12,
Script_Bhaiksuki = 13,
Script_Bopomofo = 14,
Script_Brahmi = 15,
Script_Braille = 16,
Script_Buginese = 17,
Script_Buhid = 18,
Script_Canadian_Aboriginal = 19,
Script_Carian = 20,
Script_Caucasian_Albanian = 21,
Script_Chakma = 22,
Script_Cham = 23,
Script_Cherokee = 24,
Script_Coptic = 25,
Script_Cuneiform = 26,
Script_Cypriot = 27,
Script_Cyrillic = 28,
Script_Deseret = 29,
Script_Devanagari = 30,
Script_Duployan = 31,
Script_Egyptian_Hieroglyphs = 32,
Script_Elbasan = 33,
Script_Ethiopic = 34,
Script_Georgian = 35,
Script_Glagolitic = 36,
Script_Gothic = 37,
Script_Grantha = 38,
Script_Greek = 39,
Script_Gujarati = 40,
Script_Gurmukhi = 41,
Script_Han = 42,
Script_Hangul = 43,
Script_Hanunoo = 44,
Script_Hatran = 45,
Script_Hebrew = 46,
Script_Hiragana = 47,
Script_Imperial_Aramaic = 48,
Script_Inscriptional_Pahlavi = 49,
Script_Inscriptional_Parthian = 50,
Script_Javanese = 51,
Script_Kaithi = 52,
Script_Kannada = 53,
Script_Katakana = 54,
Script_Kayah_Li = 55,
Script_Kharoshthi = 56,
Script_Khmer = 57,
Script_Khojki = 58,
Script_Khudawadi = 59,
Script_Lao = 60,
Script_Latin = 61,
Script_Lepcha = 62,
Script_Limbu = 63,
Script_Linear_A = 64,
Script_Linear_B = 65,
Script_Lisu = 66,
Script_Lycian = 67,
Script_Lydian = 68,
Script_Mahajani = 69,
Script_Malayalam = 70,
Script_Mandaic = 71,
Script_Manichaean = 72,
Script_Marchen = 73,
Script_Meetei_Mayek = 74,
Script_Mende_Kikakui = 75,
Script_Meroitic_Cursive = 76,
Script_Meroitic_Hieroglyphs = 77,
Script_Miao = 78,
Script_Modi = 79,
Script_Mongolian = 80,
Script_Mro = 81,
Script_Multani = 82,
Script_Myanmar = 83,
Script_Nabataean = 84,
Script_New_Tai_Lue = 85,
Script_Newa = 86,
Script_Nko = 87,
Script_Ogham = 88,
Script_Ol_Chiki = 89,
Script_Old_Hungarian = 90,
Script_Old_Italic = 91,
Script_Old_North_Arabian = 92,
Script_Old_Permic = 93,
Script_Old_Persian = 94,
Script_Old_South_Arabian = 95,
Script_Old_Turkic = 96,
Script_Oriya = 97,
Script_Osage = 98,
Script_Osmanya = 99,
Script_Pahawh_Hmong = 100,
Script_Palmyrene = 101,
Script_Pau_Cin_Hau = 102,
Script_Phags_Pa = 103,
Script_Phoenician = 104,
Script_Psalter_Pahlavi = 105,
Script_Rejang = 106,
Script_Runic = 107,
Script_Samaritan = 108,
Script_Saurashtra = 109,
Script_Sharada = 110,
Script_Shavian = 111,
Script_Siddham = 112,
Script_SignWriting = 113,
Script_Sinhala = 114,
Script_Sora_Sompeng = 115,
Script_Sundanese = 116,
Script_Syloti_Nagri = 117,
Script_Syriac = 118,
Script_Tagalog = 119,
Script_Tagbanwa = 120,
Script_Tai_Le = 121,
Script_Tai_Tham = 122,
Script_Tai_Viet = 123,
Script_Takri = 124,
Script_Tamil = 125,
Script_Tangut = 126,
Script_Telugu = 127,
Script_Thaana = 128,
Script_Thai = 129,
Script_Tibetan = 130,
Script_Tifinagh = 131,
Script_Tirhuta = 132,
Script_Ugaritic = 133,
Script_Vai = 134,
Script_Warang_Citi = 135,
Script_Yi = 136,
Script_LastId = 136
Script_Inherited = 2,
Script_Arabic = 3,
Script_Armenian = 4,
Script_Avestan = 5,
Script_Balinese = 6,
Script_Bamum = 7,
Script_Batak = 8,
Script_Bengali = 9,
Script_Bopomofo = 10,
Script_Brahmi = 11,
Script_Braille = 12,
Script_Buginese = 13,
Script_Buhid = 14,
Script_Canadian_Aboriginal = 15,
Script_Carian = 16,
Script_Cham = 17,
Script_Cherokee = 18,
Script_Coptic = 19,
Script_Cuneiform = 20,
Script_Cypriot = 21,
Script_Cyrillic = 22,
Script_Deseret = 23,
Script_Devanagari = 24,
Script_Egyptian_Hieroglyphs = 25,
Script_Ethiopic = 26,
Script_Georgian = 27,
Script_Glagolitic = 28,
Script_Gothic = 29,
Script_Greek = 30,
Script_Gujarati = 31,
Script_Gurmukhi = 32,
Script_Han = 33,
Script_Hangul = 34,
Script_Hanunoo = 35,
Script_Hebrew = 36,
Script_Hiragana = 37,
Script_Imperial_Aramaic = 38,
Script_Inscriptional_Pahlavi = 39,
Script_Inscriptional_Parthian = 40,
Script_Javanese = 41,
Script_Kaithi = 42,
Script_Kannada = 43,
Script_Katakana = 44,
Script_Kayah_Li = 45,
Script_Kharoshthi = 46,
Script_Khmer = 47,
Script_Lao = 48,
Script_Latin = 49,
Script_Lepcha = 50,
Script_Limbu = 51,
Script_Linear_B = 52,
Script_Lisu = 53,
Script_Lycian = 54,
Script_Lydian = 55,
Script_Malayalam = 56,
Script_Mandaic = 57,
Script_Meetei_Mayek = 58,
Script_Mongolian = 59,
Script_Myanmar = 60,
Script_New_Tai_Lue = 61,
Script_Nko = 62,
Script_Ogham = 63,
Script_Ol_Chiki = 64,
Script_Old_Italic = 65,
Script_Old_Persian = 66,
Script_Old_South_Arabian = 67,
Script_Old_Turkic = 68,
Script_Oriya = 69,
Script_Osmanya = 70,
Script_Phags_Pa = 71,
Script_Phoenician = 72,
Script_Rejang = 73,
Script_Runic = 74,
Script_Samaritan = 75,
Script_Saurashtra = 76,
Script_Shavian = 77,
Script_Sinhala = 78,
Script_Sundanese = 79,
Script_Syloti_Nagri = 80,
Script_Syriac = 81,
Script_Tagalog = 82,
Script_Tagbanwa = 83,
Script_Tai_Le = 84,
Script_Tai_Tham = 85,
Script_Tai_Viet = 86,
Script_Tamil = 87,
Script_Telugu = 88,
Script_Thaana = 89,
Script_Thai = 90,
Script_Tibetan = 91,
Script_Tifinagh = 92,
Script_Ugaritic = 93,
Script_Vai = 94,
Script_Yi = 95,
Script_Chakma = 96,
Script_Meroitic_Cursive = 97,
Script_Meroitic_Hieroglyphs = 98,
Script_Miao = 99,
Script_Sharada = 100,
Script_Sora_Sompeng = 101,
Script_Takri = 102,
Script_Bassa_Vah = 103,
Script_Caucasian_Albanian = 104,
Script_Duployan = 105,
Script_Elbasan = 106,
Script_Grantha = 107,
Script_Khojki = 108,
Script_Khudawadi = 109,
Script_Linear_A = 110,
Script_Mahajani = 111,
Script_Manichaean = 112,
Script_Mende_Kikakui = 113,
Script_Modi = 114,
Script_Mro = 115,
Script_Nabataean = 116,
Script_Old_North_Arabian = 117,
Script_Old_Permic = 118,
Script_Pahawh_Hmong = 119,
Script_Palmyrene = 120,
Script_Pau_Cin_Hau = 121,
Script_Psalter_Pahlavi = 122,
Script_Siddham = 123,
Script_Tirhuta = 124,
Script_Warang_Citi = 125,
Script_LastId = 125
};

View File

@ -1320,6 +1320,138 @@ sub dump_linebreak($)
save_file($filename);
}
my %scripts =
(
"Unknown" => 0,
"Common" => 1,
"Inherited" => 2,
"Arabic" => 3,
"Armenian" => 4,
"Avestan" => 5,
"Balinese" => 6,
"Bamum" => 7,
"Batak" => 8,
"Bengali" => 9,
"Bopomofo" => 10,
"Brahmi" => 11,
"Braille" => 12,
"Buginese" => 13,
"Buhid" => 14,
"Canadian_Aboriginal" => 15,
"Carian" => 16,
"Cham" => 17,
"Cherokee" => 18,
"Coptic" => 19,
"Cuneiform" => 20,
"Cypriot" => 21,
"Cyrillic" => 22,
"Deseret" => 23,
"Devanagari" => 24,
"Egyptian_Hieroglyphs" => 25,
"Ethiopic" => 26,
"Georgian" => 27,
"Glagolitic" => 28,
"Gothic" => 29,
"Greek" => 30,
"Gujarati" => 31,
"Gurmukhi" => 32,
"Han" => 33,
"Hangul" => 34,
"Hanunoo" => 35,
"Hebrew" => 36,
"Hiragana" => 37,
"Imperial_Aramaic" => 38,
"Inscriptional_Pahlavi" => 39,
"Inscriptional_Parthian" => 40,
"Javanese" => 41,
"Kaithi" => 42,
"Kannada" => 43,
"Katakana" => 44,
"Kayah_Li" => 45,
"Kharoshthi" => 46,
"Khmer" => 47,
"Lao" => 48,
"Latin" => 49,
"Lepcha" => 50,
"Limbu" => 51,
"Linear_B" => 52,
"Lisu" => 53,
"Lycian" => 54,
"Lydian" => 55,
"Malayalam" => 56,
"Mandaic" => 57,
"Meetei_Mayek" => 58,
"Mongolian" => 59,
"Myanmar" => 60,
"New_Tai_Lue" => 61,
"Nko" => 62,
"Ogham" => 63,
"Ol_Chiki" => 64,
"Old_Italic" => 65,
"Old_Persian" => 66,
"Old_South_Arabian" => 67,
"Old_Turkic" => 68,
"Oriya" => 69,
"Osmanya" => 70,
"Phags_Pa" => 71,
"Phoenician" => 72,
"Rejang" => 73,
"Runic" => 74,
"Samaritan" => 75,
"Saurashtra" => 76,
"Shavian" => 77,
"Sinhala" => 78,
"Sundanese" => 79,
"Syloti_Nagri" => 80,
"Syriac" => 81,
"Tagalog" => 82,
"Tagbanwa" => 83,
"Tai_Le" => 84,
"Tai_Tham" => 85,
"Tai_Viet" => 86,
"Tamil" => 87,
"Telugu" => 88,
"Thaana" => 89,
"Thai" => 90,
"Tibetan" => 91,
"Tifinagh" => 92,
"Ugaritic" => 93,
"Vai" => 94,
"Yi" => 95,
# Win8/Win8.1
"Chakma" => 96,
"Meroitic_Cursive" => 97,
"Meroitic_Hieroglyphs" => 98,
"Miao" => 99,
"Sharada" => 100,
"Sora_Sompeng" => 101,
"Takri" => 102,
# Win10
"Bassa_Vah" => 103,
"Caucasian_Albanian" => 104,
"Duployan" => 105,
"Elbasan" => 106,
"Grantha" => 107,
"Khojki" => 108,
"Khudawadi" => 109,
"Linear_A" => 110,
"Mahajani" => 111,
"Manichaean" => 112,
"Mende_Kikakui" => 113,
"Modi" => 114,
"Mro" => 115,
"Nabataean" => 116,
"Old_North_Arabian" => 117,
"Old_Permic" => 118,
"Pahawh_Hmong" => 119,
"Palmyrene" => 120,
"Pau_Cin_Hau" => 121,
"Psalter_Pahlavi" => 122,
"Siddham" => 123,
"Tirhuta" => 124,
"Warang_Citi" => 125,
);
################################################################
# dump Script IDs table
sub dump_scripts($)
@ -1328,10 +1460,11 @@ sub dump_scripts($)
my $header = $filename;
my @scripts_table;
my $script_index;
my %scripts;
my $i;
my $INPUT = open_data_file( $UNIDATA, "Scripts.txt" );
# Fill the table
# Unknown script id is always 0, so undefined scripts are automatically treated as such
while (<$INPUT>)
{
my $type = "";
@ -1339,49 +1472,7 @@ sub dump_scripts($)
next if /^\#/; # skip comments
next if /^\s*$/; # skip empty lines
next if /\x1a/; # skip ^Z
if (/^\s*([0-9a-fA-F]+)\s*;\s*([_a-zA-Z]+)\s*/)
{
$type = $2;
}
elsif (/^\s*([0-9a-fA-F]+)..\s*([0-9a-fA-F]+)\s*;\s*([_a-zA-Z]+)\s*/)
{
$type = $3;
}
else
{
die "malformed line $_";
}
# ignore some scripts
if ($type eq "Common" || $type eq "Inherited")
{
next;
}
$scripts{$type} = -1;
}
# assign script indices, starting from index 2
$script_index = 1;
foreach my $script (sort keys %scripts) {
$scripts{$script} = ++$script_index;
}
# indices change when new scripts are added to the standard,
# keep Unknown/Common at fixed positions, Inherited is treated as Unknown
$scripts{"Unknown"} = 0;
$scripts{"Inherited"} = 0;
$scripts{"Common"} = 1;
# now fill a table
seek $INPUT, 0, 0;
while (<$INPUT>)
{
my $type = "";
next if /^\#/; # skip comments
next if /^\s*$/; # skip empty lines
next if /\x1a/; # skip ^Z
if (/^\s*([0-9a-fA-F]+)\s*;\s*([a-zA-Z]+)\s*/)
if (/^\s*([0-9a-fA-F]+)\s*;\s*([a-zA-Z_]+)\s*/)
{
$type = $2;
if (defined $scripts{$type})
@ -1390,7 +1481,7 @@ sub dump_scripts($)
}
next;
}
elsif (/^\s*([0-9a-fA-F]+)..\s*([0-9a-fA-F]+)\s*;\s*([a-zA-Z]+)\s*/)
elsif (/^\s*([0-9a-fA-F]+)..\s*([0-9a-fA-F]+)\s*;\s*([a-zA-Z_]+)\s*/)
{
$type = $3;
if (defined $scripts{$type})
@ -1413,14 +1504,12 @@ sub dump_scripts($)
print OUTPUT "/* generated from $UNIDATA/Scripts.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
# Inherited was consumed by Unknown, we don't need it as a separate enum member
delete $scripts{"Inherited"};
print OUTPUT "enum unicode_script_id {\n";
foreach my $script (sort { $scripts{$a} <=> $scripts{$b} } keys %scripts)
{
print OUTPUT " Script_$script = $scripts{$script},\n";
}
print OUTPUT " Script_LastId = $script_index\n";
print OUTPUT " Script_LastId = ", (scalar keys %scripts) - 1, "\n";
print OUTPUT "};\n";
close OUTPUT;