[use] Add Halant_Or_Vowel_Modifier category

Fixes https://github.com/harfbuzz/harfbuzz/issues/1102
This commit is contained in:
Behdad Esfahbod 2018-10-03 12:29:56 +02:00
parent 6353cc1f83
commit 75114e01d2
7 changed files with 301 additions and 245 deletions

View File

@ -197,7 +197,10 @@ def is_CONS_SUB(U, UISC, UGC):
def is_CONS_WITH_STACKER(U, UISC, UGC): def is_CONS_WITH_STACKER(U, UISC, UGC):
return UISC == Consonant_With_Stacker return UISC == Consonant_With_Stacker
def is_HALANT(U, UISC, UGC): def is_HALANT(U, UISC, UGC):
return UISC in [Virama, Invisible_Stacker] return UISC in [Virama, Invisible_Stacker] and not is_HALANT_OR_VOWEL_MODIFIER(U, UISC, UGC)
def is_HALANT_OR_VOWEL_MODIFIER(U, UISC, UGC):
# https://github.com/harfbuzz/harfbuzz/issues/1102
return U == 0x11046
def is_HALANT_NUM(U, UISC, UGC): def is_HALANT_NUM(U, UISC, UGC):
return UISC == Number_Joiner return UISC == Number_Joiner
def is_ZWNJ(U, UISC, UGC): def is_ZWNJ(U, UISC, UGC):
@ -248,6 +251,7 @@ use_mapping = {
'SUB': is_CONS_SUB, 'SUB': is_CONS_SUB,
'CS': is_CONS_WITH_STACKER, 'CS': is_CONS_WITH_STACKER,
'H': is_HALANT, 'H': is_HALANT,
'HVM': is_HALANT_OR_VOWEL_MODIFIER,
'HN': is_HALANT_NUM, 'HN': is_HALANT_NUM,
'ZWNJ': is_ZWNJ, 'ZWNJ': is_ZWNJ,
'ZWJ': is_ZWJ, 'ZWJ': is_ZWJ,
@ -295,6 +299,7 @@ use_positions = {
'Blw': [Bottom], 'Blw': [Bottom],
}, },
'H': None, 'H': None,
'HVM': None,
'B': None, 'B': None,
'FM': None, 'FM': None,
'SUB': None, 'SUB': None,

View File

@ -36,227 +36,266 @@
#line 38 "hb-ot-shape-complex-use-machine.hh" #line 38 "hb-ot-shape-complex-use-machine.hh"
static const unsigned char _use_syllable_machine_trans_keys[] = { static const unsigned char _use_syllable_machine_trans_keys[] = {
12u, 12u, 1u, 15u, 1u, 1u, 12u, 12u, 0u, 43u, 21u, 21u, 8u, 39u, 8u, 39u, 12u, 44u, 1u, 15u, 1u, 1u, 12u, 44u, 0u, 44u, 21u, 21u, 8u, 44u, 8u, 44u,
1u, 15u, 1u, 1u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u, 8u, 26u, 8u, 26u, 1u, 15u, 1u, 1u, 8u, 44u, 8u, 44u, 8u, 39u, 8u, 26u, 8u, 26u, 8u, 26u,
8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 44u, 8u, 44u, 8u, 44u, 8u, 44u, 8u, 44u,
8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 13u, 21u, 4u, 4u, 13u, 13u, 8u, 39u, 8u, 44u, 8u, 44u, 8u, 44u, 1u, 39u, 8u, 44u, 13u, 21u, 4u, 4u, 13u, 13u,
8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u, 8u, 26u, 8u, 26u, 8u, 39u, 8u, 39u, 8u, 44u, 8u, 44u, 8u, 44u, 8u, 39u, 8u, 26u, 8u, 26u, 8u, 26u, 8u, 39u,
8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 44u, 8u, 44u, 8u, 44u, 8u, 44u, 8u, 44u, 8u, 44u,
8u, 39u, 1u, 15u, 12u, 12u, 1u, 39u, 8u, 39u, 21u, 42u, 41u, 42u, 42u, 42u, 8u, 44u, 8u, 44u, 1u, 39u, 1u, 15u, 12u, 44u, 1u, 44u, 8u, 44u, 21u, 42u,
1u, 5u, 0 41u, 42u, 42u, 42u, 1u, 5u, 0
}; };
static const char _use_syllable_machine_key_spans[] = { static const char _use_syllable_machine_key_spans[] = {
1, 15, 1, 1, 44, 1, 32, 32, 33, 15, 1, 33, 45, 1, 37, 37,
15, 1, 32, 32, 32, 19, 19, 19, 15, 1, 37, 37, 32, 19, 19, 19,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 37, 37, 37, 37, 37,
32, 32, 32, 32, 9, 1, 1, 32, 37, 37, 37, 39, 37, 9, 1, 1,
32, 32, 32, 19, 19, 19, 32, 32, 37, 37, 37, 32, 19, 19, 19, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 37, 37, 37, 37, 37, 37,
32, 15, 1, 39, 32, 22, 2, 1, 37, 37, 39, 15, 33, 44, 37, 22,
5 2, 1, 5
}; };
static const short _use_syllable_machine_index_offsets[] = { static const short _use_syllable_machine_index_offsets[] = {
0, 2, 18, 20, 22, 67, 69, 102, 0, 34, 50, 52, 86, 132, 134, 172,
135, 151, 153, 186, 219, 252, 272, 292, 210, 226, 228, 266, 304, 337, 357, 377,
312, 345, 378, 411, 444, 477, 510, 543, 397, 430, 463, 496, 534, 572, 610, 648,
576, 609, 642, 675, 708, 718, 720, 722, 686, 724, 762, 800, 840, 878, 888, 890,
755, 788, 821, 854, 874, 894, 914, 947, 892, 930, 968, 1006, 1039, 1059, 1079, 1099,
980, 1013, 1046, 1079, 1112, 1145, 1178, 1211, 1132, 1165, 1198, 1236, 1274, 1312, 1350, 1388,
1244, 1277, 1293, 1295, 1335, 1368, 1391, 1394, 1426, 1464, 1502, 1542, 1558, 1592, 1637, 1675,
1396 1698, 1701, 1703
}; };
static const char _use_syllable_machine_indicies[] = { static const char _use_syllable_machine_indicies[] = {
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 3, 2, 2, 2, 2, 2, 1, 0, 3, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4, 2, 3, 2, 6, 5, 7, 8, 4, 2, 3, 2, 6, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 6, 5, 7, 8,
9, 7, 10, 8, 9, 9, 11, 9, 9, 7, 10, 8, 9, 9, 11, 9,
9, 3, 12, 9, 9, 13, 7, 7, 9, 3, 12, 9, 9, 13, 7, 7,
14, 15, 9, 9, 16, 17, 18, 19, 14, 15, 9, 9, 16, 17, 18, 19,
20, 21, 22, 16, 23, 24, 25, 26, 20, 21, 22, 16, 23, 24, 25, 26,
27, 28, 9, 29, 30, 31, 9, 9, 27, 28, 9, 29, 30, 31, 9, 9,
9, 32, 9, 34, 33, 36, 35, 35, 9, 32, 33, 9, 35, 34, 37, 36,
37, 1, 35, 35, 38, 35, 35, 35, 36, 38, 1, 36, 36, 39, 36, 36,
35, 35, 39, 40, 41, 42, 43, 44, 36, 36, 36, 40, 41, 42, 43, 44,
45, 46, 40, 47, 39, 48, 49, 50, 45, 46, 47, 41, 48, 40, 49, 50,
51, 35, 52, 53, 54, 35, 36, 35, 51, 52, 36, 53, 54, 55, 36, 36,
35, 37, 1, 35, 35, 38, 35, 35, 36, 36, 56, 36, 37, 36, 36, 38,
35, 35, 35, 55, 40, 41, 42, 43, 1, 36, 36, 39, 36, 36, 36, 36,
44, 45, 46, 40, 47, 48, 48, 49, 36, 57, 41, 42, 43, 44, 45, 46,
50, 51, 35, 52, 53, 54, 35, 37, 47, 41, 48, 49, 49, 50, 51, 52,
56, 56, 56, 56, 56, 56, 56, 56, 36, 53, 54, 55, 36, 36, 36, 36,
56, 56, 56, 56, 56, 57, 56, 37, 56, 36, 38, 58, 58, 58, 58, 58,
56, 36, 35, 35, 37, 1, 35, 35, 58, 58, 58, 58, 58, 58, 58, 58,
38, 35, 35, 35, 35, 35, 35, 40, 59, 58, 38, 58, 37, 36, 36, 38,
41, 42, 43, 44, 45, 46, 40, 47, 1, 36, 36, 39, 36, 36, 36, 36,
48, 48, 49, 50, 51, 35, 52, 53, 36, 36, 41, 42, 43, 44, 45, 46,
54, 35, 36, 35, 35, 35, 35, 35, 47, 41, 48, 49, 49, 50, 51, 52,
35, 35, 35, 35, 35, 35, 35, 35, 36, 53, 54, 55, 36, 36, 36, 36,
40, 41, 42, 43, 44, 35, 35, 35, 56, 36, 37, 36, 36, 36, 36, 36,
35, 35, 35, 49, 50, 51, 35, 52, 36, 36, 36, 36, 36, 36, 36, 36,
53, 54, 35, 36, 35, 35, 35, 35, 41, 42, 43, 44, 45, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 50, 51, 52, 36, 53,
35, 35, 41, 42, 43, 44, 35, 35, 54, 55, 36, 36, 36, 36, 42, 36,
35, 35, 35, 35, 35, 35, 35, 35, 37, 36, 36, 36, 36, 36, 36, 36,
52, 53, 54, 35, 36, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 42,
35, 35, 35, 35, 35, 35, 35, 35, 43, 44, 45, 36, 36, 36, 36, 36,
35, 35, 35, 35, 42, 43, 44, 35, 36, 36, 36, 36, 36, 53, 54, 55,
36, 35, 35, 35, 35, 35, 35, 35, 36, 37, 36, 36, 36, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 43, 44, 35, 36, 35, 35, 35, 36, 43, 44, 45, 36, 37, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 35, 35, 35, 35, 35, 44, 35, 36, 36, 36, 36, 36, 36, 44, 45,
36, 35, 35, 35, 35, 35, 35, 35, 36, 37, 36, 36, 36, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
42, 43, 44, 35, 35, 35, 35, 35, 36, 36, 36, 45, 36, 37, 36, 36,
35, 35, 35, 35, 35, 52, 53, 54, 36, 36, 36, 36, 36, 36, 36, 36,
35, 36, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 43, 44, 45,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 42, 43, 44, 35, 35, 35, 35, 36, 36, 53, 54, 55, 36, 37, 36,
35, 35, 35, 35, 35, 35, 35, 53, 36, 36, 36, 36, 36, 36, 36, 36,
54, 35, 36, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 43, 44,
35, 35, 35, 35, 35, 35, 35, 35, 45, 36, 36, 36, 36, 36, 36, 36,
35, 35, 42, 43, 44, 35, 35, 35, 36, 36, 36, 36, 54, 55, 36, 37,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 54, 35, 36, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 43,
35, 35, 35, 35, 35, 35, 35, 35, 44, 45, 36, 36, 36, 36, 36, 36,
35, 35, 41, 42, 43, 44, 35, 35, 36, 36, 36, 36, 36, 36, 55, 36,
35, 35, 35, 35, 49, 50, 51, 35, 37, 36, 36, 36, 36, 36, 36, 36,
52, 53, 54, 35, 36, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 42,
35, 35, 35, 35, 35, 35, 35, 35, 43, 44, 45, 36, 36, 36, 36, 36,
35, 35, 35, 41, 42, 43, 44, 35, 36, 50, 51, 52, 36, 53, 54, 55,
35, 35, 35, 35, 35, 35, 50, 51, 36, 36, 36, 36, 42, 36, 37, 36,
35, 52, 53, 54, 35, 36, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 42, 43, 44,
35, 35, 35, 35, 41, 42, 43, 44, 45, 36, 36, 36, 36, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 51, 52, 36, 53, 54, 55, 36, 36,
51, 35, 52, 53, 54, 35, 36, 35, 36, 36, 42, 36, 37, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 35, 35, 35, 40, 41, 42, 43, 36, 36, 36, 42, 43, 44, 45, 36,
44, 35, 46, 40, 35, 35, 35, 49, 36, 36, 36, 36, 36, 36, 36, 52,
50, 51, 35, 52, 53, 54, 35, 36, 36, 53, 54, 55, 36, 36, 36, 36,
35, 35, 35, 35, 35, 35, 35, 35, 42, 36, 37, 36, 36, 36, 36, 36,
35, 35, 35, 35, 35, 40, 41, 42, 36, 36, 36, 36, 36, 36, 36, 36,
43, 44, 35, 58, 40, 35, 35, 35, 41, 42, 43, 44, 45, 36, 47, 41,
49, 50, 51, 35, 52, 53, 54, 35, 36, 36, 36, 50, 51, 52, 36, 53,
36, 35, 35, 35, 35, 35, 35, 35, 54, 55, 36, 36, 36, 36, 42, 36,
35, 35, 35, 35, 35, 35, 40, 41, 37, 36, 36, 36, 36, 36, 36, 36,
42, 43, 44, 35, 35, 40, 35, 35, 36, 36, 36, 36, 36, 36, 41, 42,
35, 49, 50, 51, 35, 52, 53, 54, 43, 44, 45, 36, 60, 41, 36, 36,
35, 36, 35, 35, 35, 35, 35, 35, 36, 50, 51, 52, 36, 53, 54, 55,
35, 35, 35, 35, 35, 35, 35, 40, 36, 36, 36, 36, 42, 36, 37, 36,
41, 42, 43, 44, 45, 46, 40, 35, 36, 36, 36, 36, 36, 36, 36, 36,
35, 35, 49, 50, 51, 35, 52, 53, 36, 36, 36, 36, 41, 42, 43, 44,
54, 35, 36, 35, 35, 37, 1, 35, 45, 36, 36, 41, 36, 36, 36, 50,
35, 38, 35, 35, 35, 35, 35, 35, 51, 52, 36, 53, 54, 55, 36, 36,
40, 41, 42, 43, 44, 45, 46, 40, 36, 36, 42, 36, 37, 36, 36, 36,
47, 35, 48, 49, 50, 51, 35, 52, 36, 36, 36, 36, 36, 36, 36, 36,
53, 54, 35, 36, 35, 35, 37, 1, 36, 36, 41, 42, 43, 44, 45, 46,
35, 35, 38, 35, 35, 35, 35, 35, 47, 41, 36, 36, 36, 50, 51, 52,
35, 40, 41, 42, 43, 44, 45, 46, 36, 53, 54, 55, 36, 36, 36, 36,
40, 47, 39, 48, 49, 50, 51, 35, 42, 36, 37, 36, 36, 38, 1, 36,
52, 53, 54, 35, 60, 59, 59, 59, 36, 39, 36, 36, 36, 36, 36, 36,
59, 59, 59, 59, 61, 59, 10, 62, 41, 42, 43, 44, 45, 46, 47, 41,
60, 59, 11, 63, 63, 3, 6, 63, 48, 36, 49, 50, 51, 52, 36, 53,
63, 64, 63, 63, 63, 63, 63, 65, 54, 55, 36, 36, 36, 36, 56, 36,
38, 58, 58, 58, 58, 58, 58, 37,
58, 58, 58, 58, 58, 58, 59, 58,
58, 58, 58, 58, 58, 58, 42, 43,
44, 45, 58, 58, 58, 58, 58, 58,
58, 58, 58, 58, 53, 54, 55, 58,
37, 36, 36, 38, 1, 36, 36, 39,
36, 36, 36, 36, 36, 36, 41, 42,
43, 44, 45, 46, 47, 41, 48, 40,
49, 50, 51, 52, 36, 53, 54, 55,
36, 36, 36, 36, 56, 36, 62, 61,
61, 61, 61, 61, 61, 61, 63, 61,
10, 64, 62, 61, 11, 65, 65, 3,
6, 65, 65, 66, 65, 65, 65, 65,
65, 67, 16, 17, 18, 19, 20, 21,
22, 16, 23, 25, 25, 26, 27, 28,
65, 29, 30, 31, 65, 65, 65, 65,
33, 65, 11, 65, 65, 3, 6, 65,
65, 66, 65, 65, 65, 65, 65, 65,
16, 17, 18, 19, 20, 21, 22, 16, 16, 17, 18, 19, 20, 21, 22, 16,
23, 25, 25, 26, 27, 28, 63, 29, 23, 25, 25, 26, 27, 28, 65, 29,
30, 31, 63, 11, 63, 63, 3, 6, 30, 31, 65, 65, 65, 65, 33, 65,
63, 63, 64, 63, 63, 63, 63, 63, 11, 65, 65, 65, 65, 65, 65, 65,
63, 16, 17, 18, 19, 20, 21, 22, 65, 65, 65, 65, 65, 65, 16, 17,
16, 23, 25, 25, 26, 27, 28, 63, 18, 19, 20, 65, 65, 65, 65, 65,
29, 30, 31, 63, 11, 63, 63, 63, 65, 26, 27, 28, 65, 29, 30, 31,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 17, 65, 11, 65,
63, 63, 16, 17, 18, 19, 20, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 26, 27, 28, 65, 65, 65, 65, 65, 17, 18, 19,
63, 29, 30, 31, 63, 11, 63, 63, 20, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 29, 30, 31, 65, 11,
63, 63, 63, 63, 17, 18, 19, 20, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 18,
63, 63, 29, 30, 31, 63, 11, 63, 19, 20, 65, 11, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 18, 19, 65, 65, 65, 65, 19, 20, 65, 11,
20, 63, 11, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 19, 20, 63, 11, 63, 65, 20, 65, 11, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 18, 19, 20, 65, 65,
20, 63, 11, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 29, 30, 31, 65, 11, 65, 65, 65,
63, 63, 18, 19, 20, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 29, 65, 65, 65, 65, 18, 19, 20, 65,
30, 31, 63, 11, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 30, 31, 65, 11, 65, 65,
63, 63, 63, 18, 19, 20, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 18, 19, 20,
63, 30, 31, 63, 11, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 31, 65, 11, 65,
63, 63, 63, 63, 18, 19, 20, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 17, 18, 19,
63, 63, 63, 31, 63, 11, 63, 63, 20, 65, 65, 65, 65, 65, 65, 26,
63, 63, 63, 63, 63, 63, 63, 63, 27, 28, 65, 29, 30, 31, 65, 65,
63, 63, 63, 63, 17, 18, 19, 20, 65, 65, 17, 65, 11, 65, 65, 65,
63, 63, 63, 63, 63, 63, 26, 27, 65, 65, 65, 65, 65, 65, 65, 65,
28, 63, 29, 30, 31, 63, 11, 63, 65, 65, 65, 17, 18, 19, 20, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 27, 28,
63, 63, 63, 63, 63, 17, 18, 19, 65, 29, 30, 31, 65, 65, 65, 65,
20, 63, 63, 63, 63, 63, 63, 63, 17, 65, 11, 65, 65, 65, 65, 65,
27, 28, 63, 29, 30, 31, 63, 11, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 17, 18, 19, 20, 65, 65, 65,
63, 63, 63, 63, 63, 63, 17, 18, 65, 65, 65, 65, 65, 28, 65, 29,
19, 20, 63, 63, 63, 63, 63, 63, 30, 31, 65, 65, 65, 65, 17, 65,
63, 63, 28, 63, 29, 30, 31, 63, 11, 65, 65, 65, 65, 65, 65, 65,
11, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 16, 17,
63, 63, 63, 63, 63, 63, 16, 17, 18, 19, 20, 65, 22, 16, 65, 65,
18, 19, 20, 63, 22, 16, 63, 63, 65, 26, 27, 28, 65, 29, 30, 31,
63, 26, 27, 28, 63, 29, 30, 31, 65, 65, 65, 65, 17, 65, 11, 65,
63, 11, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 16, 65, 65, 65, 65, 16, 17, 18, 19,
17, 18, 19, 20, 63, 66, 16, 63, 20, 65, 68, 16, 65, 65, 65, 26,
63, 63, 26, 27, 28, 63, 29, 30, 27, 28, 65, 29, 30, 31, 65, 65,
31, 63, 11, 63, 63, 63, 63, 63, 65, 65, 17, 65, 11, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, 65,
16, 17, 18, 19, 20, 63, 63, 16, 65, 65, 16, 17, 18, 19, 20, 65,
63, 63, 63, 26, 27, 28, 63, 29, 65, 16, 65, 65, 65, 26, 27, 28,
30, 31, 63, 11, 63, 63, 63, 63, 65, 29, 30, 31, 65, 65, 65, 65,
63, 63, 63, 63, 63, 63, 63, 63, 17, 65, 11, 65, 65, 65, 65, 65,
63, 16, 17, 18, 19, 20, 21, 22, 65, 65, 65, 65, 65, 65, 65, 65,
16, 63, 63, 63, 26, 27, 28, 63, 16, 17, 18, 19, 20, 21, 22, 16,
29, 30, 31, 63, 11, 63, 63, 3, 65, 65, 65, 26, 27, 28, 65, 29,
6, 63, 63, 64, 63, 63, 63, 63, 30, 31, 65, 65, 65, 65, 17, 65,
63, 63, 16, 17, 18, 19, 20, 21, 11, 65, 65, 3, 6, 65, 65, 66,
22, 16, 23, 63, 25, 26, 27, 28, 65, 65, 65, 65, 65, 65, 16, 17,
63, 29, 30, 31, 63, 3, 67, 67, 18, 19, 20, 21, 22, 16, 23, 65,
67, 67, 67, 67, 67, 67, 67, 67, 25, 26, 27, 28, 65, 29, 30, 31,
67, 67, 67, 4, 67, 6, 67, 8, 65, 65, 65, 65, 33, 65, 3, 65,
63, 63, 63, 8, 63, 63, 11, 63, 65, 65, 65, 65, 65, 11, 65, 65,
63, 3, 6, 63, 63, 64, 63, 63, 65, 65, 65, 65, 4, 65, 65, 65,
63, 63, 63, 63, 16, 17, 18, 19, 65, 65, 65, 65, 17, 18, 19, 20,
20, 21, 22, 16, 23, 24, 25, 26, 65, 65, 65, 65, 65, 65, 65, 65,
27, 28, 63, 29, 30, 31, 63, 11, 65, 65, 29, 30, 31, 65, 3, 69,
63, 63, 3, 6, 63, 63, 64, 63, 69, 69, 69, 69, 69, 69, 69, 69,
63, 63, 63, 63, 63, 16, 17, 18, 69, 69, 69, 69, 4, 69, 6, 69,
69, 69, 69, 69, 69, 69, 69, 69,
69, 69, 69, 69, 69, 69, 69, 69,
69, 69, 69, 69, 69, 69, 69, 69,
69, 69, 69, 69, 69, 69, 6, 69,
8, 65, 65, 65, 8, 65, 65, 11,
65, 65, 3, 6, 65, 65, 66, 65,
65, 65, 65, 65, 65, 16, 17, 18,
19, 20, 21, 22, 16, 23, 24, 25, 19, 20, 21, 22, 16, 23, 24, 25,
26, 27, 28, 63, 29, 30, 31, 63, 26, 27, 28, 65, 29, 30, 31, 65,
69, 68, 68, 68, 68, 68, 68, 68, 65, 65, 65, 33, 65, 11, 65, 65,
68, 68, 68, 68, 68, 68, 68, 68, 3, 6, 65, 65, 66, 65, 65, 65,
68, 68, 68, 68, 69, 70, 68, 69, 65, 65, 65, 16, 17, 18, 19, 20,
70, 68, 70, 68, 8, 67, 67, 67, 21, 22, 16, 23, 24, 25, 26, 27,
8, 67, 0 28, 65, 29, 30, 31, 65, 65, 65,
65, 33, 65, 71, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 71,
72, 70, 71, 72, 70, 72, 70, 8,
69, 69, 69, 8, 69, 0
}; };
static const char _use_syllable_machine_trans_targs[] = { static const char _use_syllable_machine_trans_targs[] = {
4, 8, 4, 31, 2, 4, 1, 5, 4, 8, 4, 32, 2, 4, 1, 5,
6, 4, 28, 4, 49, 50, 51, 53, 6, 4, 29, 4, 51, 52, 53, 55,
33, 34, 35, 36, 37, 44, 45, 47, 34, 35, 36, 37, 38, 45, 46, 48,
52, 48, 41, 42, 43, 38, 39, 40, 54, 49, 42, 43, 44, 39, 40, 41,
56, 4, 4, 4, 4, 7, 0, 27, 58, 50, 4, 4, 4, 4, 7, 0,
11, 12, 13, 14, 15, 22, 23, 25, 28, 11, 12, 13, 14, 15, 22, 23,
26, 19, 20, 21, 16, 17, 18, 10, 25, 26, 19, 20, 21, 16, 17, 18,
4, 9, 24, 4, 29, 30, 4, 4, 27, 10, 4, 9, 24, 4, 30, 31,
3, 32, 46, 4, 4, 54, 55 4, 4, 3, 33, 47, 4, 4, 56,
57
}; };
static const char _use_syllable_machine_trans_actions[] = { static const char _use_syllable_machine_trans_actions[] = {
@ -264,11 +303,12 @@ static const char _use_syllable_machine_trans_actions[] = {
7, 8, 0, 9, 10, 10, 3, 0, 7, 8, 0, 9, 10, 10, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0,
0, 11, 12, 13, 14, 7, 0, 7, 0, 3, 11, 12, 13, 14, 7, 0,
0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,
7, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 0, 0,
15, 0, 0, 16, 0, 0, 17, 18, 0, 7, 15, 0, 0, 16, 0, 0,
0, 3, 0, 19, 20, 0, 0 17, 18, 0, 3, 0, 19, 20, 0,
0
}; };
static const char _use_syllable_machine_to_state_actions[] = { static const char _use_syllable_machine_to_state_actions[] = {
@ -279,7 +319,7 @@ static const char _use_syllable_machine_to_state_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 0, 0, 0
}; };
static const char _use_syllable_machine_from_state_actions[] = { static const char _use_syllable_machine_from_state_actions[] = {
@ -290,18 +330,18 @@ static const char _use_syllable_machine_from_state_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 0, 0, 0
}; };
static const short _use_syllable_machine_eof_trans[] = { static const short _use_syllable_machine_eof_trans[] = {
1, 3, 3, 6, 0, 34, 36, 36, 1, 3, 3, 6, 0, 35, 37, 37,
57, 57, 36, 36, 36, 36, 36, 36, 59, 59, 37, 37, 37, 37, 37, 37,
36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37,
36, 36, 36, 36, 60, 63, 60, 64, 37, 37, 37, 59, 37, 62, 65, 62,
64, 64, 64, 64, 64, 64, 64, 64, 66, 66, 66, 66, 66, 66, 66, 66,
64, 64, 64, 64, 64, 64, 64, 64, 66, 66, 66, 66, 66, 66, 66, 66,
64, 68, 68, 64, 64, 69, 69, 69, 66, 66, 66, 70, 70, 66, 66, 71,
68 71, 71, 70
}; };
static const int use_syllable_machine_start = 4; static const int use_syllable_machine_start = 4;
@ -315,7 +355,7 @@ static const int use_syllable_machine_en_main = 4;
#line 140 "hb-ot-shape-complex-use-machine.rl" #line 143 "hb-ot-shape-complex-use-machine.rl"
#define found_syllable(syllable_type) \ #define found_syllable(syllable_type) \
@ -334,7 +374,7 @@ find_syllables (hb_buffer_t *buffer)
int cs; int cs;
hb_glyph_info_t *info = buffer->info; hb_glyph_info_t *info = buffer->info;
#line 338 "hb-ot-shape-complex-use-machine.hh" #line 378 "hb-ot-shape-complex-use-machine.hh"
{ {
cs = use_syllable_machine_start; cs = use_syllable_machine_start;
ts = 0; ts = 0;
@ -342,7 +382,7 @@ find_syllables (hb_buffer_t *buffer)
act = 0; act = 0;
} }
#line 160 "hb-ot-shape-complex-use-machine.rl" #line 163 "hb-ot-shape-complex-use-machine.rl"
p = 0; p = 0;
@ -350,7 +390,7 @@ find_syllables (hb_buffer_t *buffer)
unsigned int syllable_serial = 1; unsigned int syllable_serial = 1;
#line 354 "hb-ot-shape-complex-use-machine.hh" #line 394 "hb-ot-shape-complex-use-machine.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@ -364,7 +404,7 @@ _resume:
#line 1 "NONE" #line 1 "NONE"
{ts = p;} {ts = p;}
break; break;
#line 368 "hb-ot-shape-complex-use-machine.hh" #line 408 "hb-ot-shape-complex-use-machine.hh"
} }
_keys = _use_syllable_machine_trans_keys + (cs<<1); _keys = _use_syllable_machine_trans_keys + (cs<<1);
@ -387,59 +427,59 @@ _eof_trans:
{te = p+1;} {te = p+1;}
break; break;
case 12: case 12:
#line 129 "hb-ot-shape-complex-use-machine.rl" #line 132 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (independent_cluster); }} {te = p+1;{ found_syllable (independent_cluster); }}
break; break;
case 14: case 14:
#line 131 "hb-ot-shape-complex-use-machine.rl" #line 134 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (standard_cluster); }} {te = p+1;{ found_syllable (standard_cluster); }}
break; break;
case 9: case 9:
#line 135 "hb-ot-shape-complex-use-machine.rl" #line 138 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (broken_cluster); }} {te = p+1;{ found_syllable (broken_cluster); }}
break; break;
case 8: case 8:
#line 136 "hb-ot-shape-complex-use-machine.rl" #line 139 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (non_cluster); }} {te = p+1;{ found_syllable (non_cluster); }}
break; break;
case 11: case 11:
#line 129 "hb-ot-shape-complex-use-machine.rl" #line 132 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (independent_cluster); }} {te = p;p--;{ found_syllable (independent_cluster); }}
break; break;
case 15: case 15:
#line 130 "hb-ot-shape-complex-use-machine.rl" #line 133 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (virama_terminated_cluster); }} {te = p;p--;{ found_syllable (virama_terminated_cluster); }}
break; break;
case 13: case 13:
#line 131 "hb-ot-shape-complex-use-machine.rl" #line 134 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (standard_cluster); }} {te = p;p--;{ found_syllable (standard_cluster); }}
break; break;
case 17: case 17:
#line 132 "hb-ot-shape-complex-use-machine.rl" #line 135 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }} {te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }}
break; break;
case 16: case 16:
#line 133 "hb-ot-shape-complex-use-machine.rl" #line 136 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (numeral_cluster); }} {te = p;p--;{ found_syllable (numeral_cluster); }}
break; break;
case 20: case 20:
#line 134 "hb-ot-shape-complex-use-machine.rl" #line 137 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (symbol_cluster); }} {te = p;p--;{ found_syllable (symbol_cluster); }}
break; break;
case 18: case 18:
#line 135 "hb-ot-shape-complex-use-machine.rl" #line 138 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (broken_cluster); }} {te = p;p--;{ found_syllable (broken_cluster); }}
break; break;
case 19: case 19:
#line 136 "hb-ot-shape-complex-use-machine.rl" #line 139 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (non_cluster); }} {te = p;p--;{ found_syllable (non_cluster); }}
break; break;
case 1: case 1:
#line 131 "hb-ot-shape-complex-use-machine.rl" #line 134 "hb-ot-shape-complex-use-machine.rl"
{{p = ((te))-1;}{ found_syllable (standard_cluster); }} {{p = ((te))-1;}{ found_syllable (standard_cluster); }}
break; break;
case 4: case 4:
#line 135 "hb-ot-shape-complex-use-machine.rl" #line 138 "hb-ot-shape-complex-use-machine.rl"
{{p = ((te))-1;}{ found_syllable (broken_cluster); }} {{p = ((te))-1;}{ found_syllable (broken_cluster); }}
break; break;
case 2: case 2:
@ -457,16 +497,16 @@ _eof_trans:
case 3: case 3:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 135 "hb-ot-shape-complex-use-machine.rl" #line 138 "hb-ot-shape-complex-use-machine.rl"
{act = 7;} {act = 7;}
break; break;
case 10: case 10:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 136 "hb-ot-shape-complex-use-machine.rl" #line 139 "hb-ot-shape-complex-use-machine.rl"
{act = 8;} {act = 8;}
break; break;
#line 470 "hb-ot-shape-complex-use-machine.hh" #line 510 "hb-ot-shape-complex-use-machine.hh"
} }
_again: _again:
@ -475,7 +515,7 @@ _again:
#line 1 "NONE" #line 1 "NONE"
{ts = 0;} {ts = 0;}
break; break;
#line 479 "hb-ot-shape-complex-use-machine.hh" #line 519 "hb-ot-shape-complex-use-machine.hh"
} }
if ( ++p != pe ) if ( ++p != pe )
@ -491,7 +531,7 @@ _again:
} }
#line 168 "hb-ot-shape-complex-use-machine.rl" #line 171 "hb-ot-shape-complex-use-machine.rl"
} }

View File

@ -88,13 +88,16 @@ SMAbv = 41; # SYM_MOD_ABOVE
SMBlw = 42; # SYM_MOD_BELOW SMBlw = 42; # SYM_MOD_BELOW
CS = 43; # CONS_WITH_STACKER CS = 43; # CONS_WITH_STACKER
HVM = 44; # HALANT_OR_VOWEL_MODIFIER
h = H | HVM; # https://github.com/harfbuzz/harfbuzz/issues/1102
# Override: Adhoc ZWJ placement. https://github.com/harfbuzz/harfbuzz/issues/542#issuecomment-353169729 # Override: Adhoc ZWJ placement. https://github.com/harfbuzz/harfbuzz/issues/542#issuecomment-353169729
consonant_modifiers = CMAbv* CMBlw* ((ZWJ?.H.ZWJ? B | SUB) VS? CMAbv? CMBlw*)*; consonant_modifiers = CMAbv* CMBlw* ((ZWJ?.h.ZWJ? B | SUB) VS? CMAbv? CMBlw*)*;
# Override: Allow two MBlw. https://github.com/harfbuzz/harfbuzz/issues/376 # Override: Allow two MBlw. https://github.com/harfbuzz/harfbuzz/issues/376
medial_consonants = MPre? MAbv? MBlw?.MBlw? MPst?; medial_consonants = MPre? MAbv? MBlw?.MBlw? MPst?;
dependent_vowels = VPre* VAbv* VBlw* VPst*; dependent_vowels = VPre* VAbv* VBlw* VPst*;
vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*; vowel_modifiers = HVM? VMPre* VMAbv* VMBlw* VMPst*;
final_consonants = FAbv* FBlw* FPst* FM?; final_consonants = FAbv* FBlw* FPst* FM?;
complex_syllable_tail = complex_syllable_tail =
@ -108,7 +111,7 @@ complex_syllable_tail =
virama_terminated_cluster = virama_terminated_cluster =
(R|CS)? (B | GB) VS? (R|CS)? (B | GB) VS?
consonant_modifiers consonant_modifiers
ZWJ?.H.ZWJ? ZWJ?.h.ZWJ?
; ;
standard_cluster = standard_cluster =
(R|CS)? (B | GB) VS? (R|CS)? (B | GB) VS?

View File

@ -24,6 +24,7 @@
#define GB USE_GB /* BASE_OTHER */ #define GB USE_GB /* BASE_OTHER */
#define H USE_H /* HALANT */ #define H USE_H /* HALANT */
#define HN USE_HN /* HALANT_NUM */ #define HN USE_HN /* HALANT_NUM */
#define HVM USE_HVM /* HALANT_OR_VOWEL_MODIFIER */
#define IND USE_IND /* BASE_IND */ #define IND USE_IND /* BASE_IND */
#define N USE_N /* BASE_NUM */ #define N USE_N /* BASE_NUM */
#define O USE_O /* OTHER */ #define O USE_O /* OTHER */
@ -508,7 +509,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11010 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11010 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 11020 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11020 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 11030 */ B, B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, /* 11030 */ B, B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw,
/* 11040 */ VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, H, O, O, O, O, O, O, O, O, O, /* 11040 */ VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, HVM, O, O, O, O, O, O, O, O, O,
/* 11050 */ O, O, N, N, N, N, N, N, N, N, N, N, N, N, N, N, /* 11050 */ O, O, N, N, N, N, N, N, N, N, N, N, N, N, N, N,
/* 11060 */ N, N, N, N, N, N, B, B, B, B, B, B, B, B, B, B, /* 11060 */ N, N, N, N, N, N, B, B, B, B, B, B, B, B, B, B,
/* 11070 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, HN, /* 11070 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, HN,
@ -800,6 +801,7 @@ hb_use_get_category (hb_codepoint_t u)
#undef GB #undef GB
#undef H #undef H
#undef HN #undef HN
#undef HVM
#undef IND #undef IND
#undef N #undef N
#undef O #undef O

View File

@ -88,7 +88,10 @@ enum use_category_t {
USE_VMPre = 23, /* VOWEL_MOD_PRE */ USE_VMPre = 23, /* VOWEL_MOD_PRE */
USE_SMAbv = 41, /* SYM_MOD_ABOVE */ USE_SMAbv = 41, /* SYM_MOD_ABOVE */
USE_SMBlw = 42, /* SYM_MOD_BELOW */ USE_SMBlw = 42, /* SYM_MOD_BELOW */
USE_CS = 43 /* CONS_WITH_STACKER */ USE_CS = 43, /* CONS_WITH_STACKER */
/* https://github.com/harfbuzz/harfbuzz/issues/1102 */
USE_HVM = 44, /* HALANT_OR_VOWEL_MODIFIER */
}; };
HB_INTERNAL USE_TABLE_ELEMENT_TYPE HB_INTERNAL USE_TABLE_ELEMENT_TYPE

View File

@ -6,3 +6,6 @@
../fonts/373e67bf41ca264e260a9716162b71a23549e885.ttf:--no-glyph-names:U+A8AC,U+A8B4,U+A8B5:[2=0+377|3=0+242|4=0+210] ../fonts/373e67bf41ca264e260a9716162b71a23549e885.ttf:--no-glyph-names:U+A8AC,U+A8B4,U+A8B5:[2=0+377|3=0+242|4=0+210]
../fonts/59a585a63b3df608fbeef00956c8c108deec7de6.ttf:--no-glyph-names:U+1BC7,U+1BEA,U+1BF3:[1=0+749|2=0+402|4=0+535|3=0+401] ../fonts/59a585a63b3df608fbeef00956c8c108deec7de6.ttf:--no-glyph-names:U+1BC7,U+1BEA,U+1BF3:[1=0+749|2=0+402|4=0+535|3=0+401]
../fonts/1ed7e9064f008f62de6ff0207bb4dd29409597a5.ttf::U+11064,U+1107F,U+11052,U+11065,U+1107F,U+11053:[brm_num100.1=0+2224|brm_num1000.2=3+1834] ../fonts/1ed7e9064f008f62de6ff0207bb4dd29409597a5.ttf::U+11064,U+1107F,U+11052,U+11065,U+1107F,U+11053:[brm_num100.1=0+2224|brm_num1000.2=3+1834]
../fonts/28f497629c04ceb15546c9a70e0730125ed6698d.ttf::U+11013,U+11042,U+11046:[brm_KA=0+754|brm_vowelEE=0@-383,0+0|brm_virama=0@-524,0+0]
../fonts/28f497629c04ceb15546c9a70e0730125ed6698d.ttf::U+11013,U+11044,U+11046:[brm_KA=0+754|brm_vowelOO=0@-647,0+0|brm_virama=0@-524,0+0]
../fonts/28f497629c04ceb15546c9a70e0730125ed6698d.ttf::U+11013,U+1103C:[brm_KA=0+754|brm_vowelU=0@-403,0+0]