[indic] Support <U+0A02, U+0A40>

This commit is contained in:
David Corbett 2022-12-04 12:25:22 -05:00 committed by Behdad Esfahbod
parent 8b533763c0
commit 260df1fa32
7 changed files with 349 additions and 298 deletions

View File

@ -95,6 +95,7 @@ categories = {
'PLACEHOLDER', 'PLACEHOLDER',
'DOTTEDCIRCLE', 'DOTTEDCIRCLE',
'RS', 'RS',
'MPst',
'Repha', 'Repha',
'Ra', 'Ra',
'CM', 'CM',
@ -168,8 +169,6 @@ category_map = {
'Vowel' : 'V', 'Vowel' : 'V',
'Vowel_Dependent' : 'M', 'Vowel_Dependent' : 'M',
'Vowel_Independent' : 'V', 'Vowel_Independent' : 'V',
'Dotted_Circle' : 'DOTTEDCIRCLE', # Ours, not Unicode's
'Ra' : 'Ra', # Ours, not Unicode's
} }
position_map = { position_map = {
'Not_Applicable' : 'END', 'Not_Applicable' : 'END',
@ -240,6 +239,9 @@ category_overrides = {
0x0953: 'SM', 0x0953: 'SM',
0x0954: 'SM', 0x0954: 'SM',
# U+0A40 GURMUKHI VOWEL SIGN II may be preceded by U+0A02 GURMUKHI SIGN BINDI.
0x0A40: 'MPst',
# The following act like consonants. # The following act like consonants.
0x0A72: 'C', 0x0A72: 'C',
0x0A73: 'C', 0x0A73: 'C',
@ -440,7 +442,7 @@ for k,new_cat in category_overrides.items():
indic_data[k] = (new_cat, pos, unicode_data[2][k]) indic_data[k] = (new_cat, pos, unicode_data[2][k])
# We only expect position for certain types # We only expect position for certain types
positioned_categories = ('CM', 'SM', 'RS', 'H', 'M') positioned_categories = ('CM', 'SM', 'RS', 'H', 'M', 'MPst')
for k, (cat, pos, block) in indic_data.items(): for k, (cat, pos, block) in indic_data.items():
if cat not in positioned_categories: if cat not in positioned_categories:
pos = 'END' pos = 'END'
@ -450,11 +452,12 @@ for k, (cat, pos, block) in indic_data.items():
# Keep in sync with CONSONANT_FLAGS in the shaper # Keep in sync with CONSONANT_FLAGS in the shaper
consonant_categories = ('C', 'CS', 'Ra','CM', 'V', 'PLACEHOLDER', 'DOTTEDCIRCLE') consonant_categories = ('C', 'CS', 'Ra','CM', 'V', 'PLACEHOLDER', 'DOTTEDCIRCLE')
matra_categories = ('M', 'MPst')
smvd_categories = ('SM', 'VD', 'A', 'Symbol') smvd_categories = ('SM', 'VD', 'A', 'Symbol')
for k, (cat, pos, block) in indic_data.items(): for k, (cat, pos, block) in indic_data.items():
if cat in consonant_categories: if cat in consonant_categories:
pos = 'BASE_C' pos = 'BASE_C'
elif cat == 'M': elif cat in matra_categories:
if block.startswith('Khmer') or block.startswith('Myanmar'): if block.startswith('Khmer') or block.startswith('Myanmar'):
cat = position_to_category(pos) cat = position_to_category(pos)
else: else:

View File

@ -53,7 +53,7 @@ enum indic_syllable_type_t {
}; };
#line 54 "hb-ot-shaper-indic-machine.hh" #line 57 "hb-ot-shaper-indic-machine.hh"
#define indic_syllable_machine_ex_A 9u #define indic_syllable_machine_ex_A 9u
#define indic_syllable_machine_ex_C 1u #define indic_syllable_machine_ex_C 1u
#define indic_syllable_machine_ex_CM 16u #define indic_syllable_machine_ex_CM 16u
@ -61,6 +61,7 @@ enum indic_syllable_type_t {
#define indic_syllable_machine_ex_DOTTEDCIRCLE 11u #define indic_syllable_machine_ex_DOTTEDCIRCLE 11u
#define indic_syllable_machine_ex_H 4u #define indic_syllable_machine_ex_H 4u
#define indic_syllable_machine_ex_M 7u #define indic_syllable_machine_ex_M 7u
#define indic_syllable_machine_ex_MPst 13u
#define indic_syllable_machine_ex_N 3u #define indic_syllable_machine_ex_N 3u
#define indic_syllable_machine_ex_PLACEHOLDER 10u #define indic_syllable_machine_ex_PLACEHOLDER 10u
#define indic_syllable_machine_ex_RS 12u #define indic_syllable_machine_ex_RS 12u
@ -75,268 +76,302 @@ enum indic_syllable_type_t {
#define indic_syllable_machine_ex_ZWNJ 5u #define indic_syllable_machine_ex_ZWNJ 5u
#line 74 "hb-ot-shaper-indic-machine.hh" #line 80 "hb-ot-shaper-indic-machine.hh"
static const unsigned char _indic_syllable_machine_trans_keys[] = { static const unsigned char _indic_syllable_machine_trans_keys[] = {
8u, 8u, 4u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 4u, 12u, 4u, 8u, 8u, 8u, 8u, 8u, 4u, 13u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 4u, 13u,
5u, 7u, 5u, 8u, 4u, 8u, 4u, 12u, 4u, 12u, 4u, 12u, 8u, 8u, 5u, 7u, 8u, 8u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 4u, 13u, 4u, 13u,
5u, 8u, 4u, 8u, 4u, 8u, 4u, 12u, 8u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 8u, 8u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 4u, 13u, 8u, 8u,
4u, 8u, 5u, 8u, 8u, 8u, 1u, 18u, 3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 5u, 13u, 8u, 8u, 1u, 18u,
5u, 9u, 5u, 9u, 9u, 9u, 5u, 9u, 1u, 15u, 1u, 15u, 1u, 15u, 3u, 9u, 3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 5u, 9u, 5u, 9u, 9u, 9u, 5u, 9u,
4u, 9u, 5u, 9u, 4u, 9u, 5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 3u, 16u, 1u, 15u, 1u, 15u, 1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 4u, 13u,
3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 3u, 16u, 3u, 16u, 3u, 16u, 4u, 16u,
5u, 9u, 9u, 9u, 5u, 9u, 1u, 15u, 1u, 15u, 3u, 9u, 4u, 9u, 5u, 9u, 1u, 15u, 3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u,
4u, 9u, 5u, 9u, 5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 3u, 16u, 4u, 8u, 1u, 15u, 1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 4u, 13u, 5u, 9u,
3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 3u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 3u, 16u, 4u, 13u, 3u, 16u, 3u, 16u,
5u, 9u, 1u, 15u, 1u, 15u, 3u, 9u, 4u, 9u, 5u, 9u, 3u, 16u, 4u, 9u, 4u, 16u, 1u, 15u, 3u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 1u, 15u,
5u, 9u, 5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 4u, 12u, 4u, 8u, 3u, 16u, 1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 3u, 16u, 4u, 13u, 5u, 9u,
3u, 16u, 4u, 16u, 1u, 15u, 3u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 4u, 13u, 4u, 13u, 3u, 16u, 3u, 16u,
1u, 15u, 1u, 15u, 3u, 9u, 4u, 9u, 5u, 9u, 3u, 16u, 4u, 9u, 5u, 9u, 4u, 16u, 1u, 15u, 3u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 1u, 15u,
5u, 9u, 3u, 9u, 5u, 9u, 1u, 16u, 3u, 16u, 1u, 16u, 4u, 12u, 5u, 9u, 1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 3u, 16u, 4u, 13u, 5u, 9u,
9u, 9u, 5u, 9u, 1u, 15u, 3u, 9u, 5u, 9u, 5u, 9u, 9u, 9u, 5u, 9u, 5u, 9u, 3u, 9u, 5u, 9u, 1u, 16u, 3u, 16u, 1u, 16u, 4u, 13u, 5u, 13u,
1u, 15u, 0 5u, 13u, 9u, 9u, 5u, 9u, 1u, 15u, 3u, 9u, 5u, 9u, 5u, 9u, 9u, 9u,
5u, 9u, 1u, 15u, 0
}; };
static const char _indic_syllable_machine_key_spans[] = { static const char _indic_syllable_machine_key_spans[] = {
1, 5, 3, 4, 5, 9, 5, 1, 1, 10, 9, 9, 1, 10, 10, 10,
3, 4, 5, 9, 9, 9, 1, 3, 1, 9, 9, 1, 10, 10, 10, 10,
4, 5, 5, 9, 1, 3, 4, 5, 1, 9, 9, 1, 10, 10, 10, 1,
5, 4, 1, 18, 14, 14, 13, 15, 9, 9, 1, 10, 10, 9, 1, 18,
5, 5, 1, 5, 15, 15, 15, 7, 14, 14, 13, 15, 5, 5, 1, 5,
6, 5, 6, 5, 7, 5, 14, 14, 15, 15, 15, 11, 10, 9, 9, 10,
14, 14, 13, 15, 14, 14, 13, 15, 5, 7, 5, 14, 14, 14, 14, 13,
5, 1, 5, 15, 15, 7, 6, 5, 15, 14, 14, 13, 15, 5, 1, 5,
6, 5, 5, 7, 5, 14, 14, 5, 15, 15, 11, 10, 9, 9, 10, 5,
14, 14, 13, 15, 14, 15, 5, 1, 5, 7, 5, 14, 14, 10, 14, 14,
5, 15, 15, 7, 6, 5, 14, 6, 13, 15, 14, 15, 5, 1, 5, 15,
5, 5, 7, 5, 14, 9, 5, 14, 15, 11, 10, 9, 9, 14, 10, 5,
14, 13, 15, 14, 15, 5, 1, 5, 5, 7, 5, 14, 10, 10, 14, 14,
15, 15, 7, 6, 5, 14, 6, 5, 13, 15, 14, 15, 5, 1, 5, 15,
5, 7, 5, 16, 14, 16, 9, 5, 15, 11, 10, 9, 9, 14, 10, 5,
1, 5, 15, 7, 5, 5, 1, 5, 5, 7, 5, 16, 14, 16, 10, 9,
15 9, 1, 5, 15, 7, 5, 5, 1,
5, 15
}; };
static const short _indic_syllable_machine_index_offsets[] = { static const short _indic_syllable_machine_index_offsets[] = {
0, 2, 8, 12, 17, 23, 33, 39, 0, 2, 13, 23, 33, 35, 46, 57,
41, 45, 50, 56, 66, 76, 86, 88, 68, 70, 80, 90, 92, 103, 114, 125,
92, 97, 103, 109, 119, 121, 125, 130, 136, 138, 148, 158, 160, 171, 182, 193,
136, 142, 147, 149, 168, 183, 198, 212, 195, 205, 215, 217, 228, 239, 249, 251,
228, 234, 240, 242, 248, 264, 280, 296, 270, 285, 300, 314, 330, 336, 342, 344,
304, 311, 317, 324, 330, 338, 344, 359, 350, 366, 382, 398, 410, 421, 431, 441,
374, 389, 404, 418, 434, 449, 464, 478, 452, 458, 466, 472, 487, 502, 517, 532,
494, 500, 502, 508, 524, 540, 548, 555, 546, 562, 577, 592, 606, 622, 628, 630,
561, 568, 574, 580, 588, 594, 609, 624, 636, 652, 668, 680, 691, 701, 711, 722,
630, 645, 660, 674, 690, 705, 721, 727, 728, 734, 742, 748, 763, 778, 789, 804,
729, 735, 751, 767, 775, 782, 788, 803, 819, 833, 849, 864, 880, 886, 888, 894,
810, 816, 822, 830, 836, 851, 861, 867, 910, 926, 938, 949, 959, 969, 984, 995,
882, 897, 911, 927, 942, 958, 964, 966, 1001, 1007, 1015, 1021, 1036, 1047, 1058, 1073,
972, 988, 1004, 1012, 1019, 1025, 1040, 1047, 1088, 1102, 1118, 1133, 1149, 1155, 1157, 1163,
1053, 1059, 1067, 1073, 1090, 1105, 1122, 1132, 1179, 1195, 1207, 1218, 1228, 1238, 1253, 1264,
1138, 1140, 1146, 1162, 1170, 1176, 1182, 1184, 1270, 1276, 1284, 1290, 1307, 1322, 1339, 1350,
1190 1360, 1370, 1372, 1378, 1394, 1402, 1408, 1414,
1416, 1422
}; };
static const unsigned char _indic_syllable_machine_indicies[] = { static const unsigned char _indic_syllable_machine_indicies[] = {
1, 0, 2, 3, 3, 4, 1, 0, 1, 0, 2, 3, 3, 4, 5, 0,
3, 3, 4, 0, 3, 3, 4, 1, 0, 0, 0, 4, 0, 3, 3, 4,
0, 5, 3, 3, 4, 1, 0, 2, 6, 0, 0, 0, 0, 4, 0, 3,
3, 3, 4, 1, 0, 0, 0, 6, 3, 4, 5, 0, 0, 0, 0, 4,
0, 8, 9, 9, 10, 11, 7, 11, 0, 4, 0, 7, 3, 3, 4, 5,
7, 9, 9, 10, 7, 9, 9, 10, 0, 0, 0, 0, 4, 0, 2, 3,
11, 7, 12, 9, 9, 10, 11, 7, 3, 4, 5, 0, 0, 0, 8, 4,
8, 9, 9, 10, 11, 7, 7, 7, 0, 10, 11, 11, 12, 13, 9, 9,
13, 7, 8, 9, 9, 10, 11, 7, 9, 9, 12, 9, 14, 9, 11, 11,
7, 7, 14, 7, 16, 17, 17, 18, 12, 15, 9, 9, 9, 9, 12, 9,
19, 15, 15, 15, 20, 15, 19, 15, 11, 11, 12, 13, 9, 9, 9, 9,
17, 17, 18, 21, 17, 17, 18, 19, 12, 9, 12, 9, 16, 11, 11, 12,
15, 16, 17, 17, 18, 19, 15, 22, 13, 9, 9, 9, 9, 12, 9, 10,
17, 17, 18, 19, 15, 24, 25, 25, 11, 11, 12, 13, 9, 9, 9, 17,
26, 27, 23, 23, 23, 28, 23, 27, 12, 9, 10, 11, 11, 12, 13, 9,
23, 25, 25, 26, 23, 25, 25, 26, 9, 9, 18, 12, 9, 20, 21, 21,
27, 23, 24, 25, 25, 26, 27, 23, 22, 23, 19, 19, 19, 24, 22, 19,
29, 25, 25, 26, 27, 23, 17, 17, 25, 19, 21, 21, 22, 27, 26, 26,
18, 1, 0, 31, 30, 33, 34, 35, 26, 26, 22, 26, 21, 21, 22, 23,
36, 37, 38, 18, 19, 39, 40, 40, 19, 19, 19, 19, 22, 19, 22, 26,
20, 32, 41, 42, 43, 44, 45, 32, 20, 21, 21, 22, 23, 19, 19, 19,
47, 48, 49, 50, 4, 1, 51, 46, 19, 22, 19, 28, 21, 21, 22, 23,
46, 6, 46, 46, 46, 52, 46, 53, 19, 19, 19, 19, 22, 19, 30, 31,
48, 54, 54, 4, 1, 51, 46, 46, 31, 32, 33, 29, 29, 29, 34, 32,
46, 46, 46, 46, 52, 46, 48, 54, 29, 35, 29, 31, 31, 32, 36, 29,
54, 4, 1, 51, 46, 46, 46, 46, 29, 29, 29, 32, 29, 31, 31, 32,
46, 46, 52, 46, 33, 46, 46, 46, 33, 29, 29, 29, 29, 32, 29, 32,
55, 56, 46, 1, 51, 46, 46, 46, 29, 30, 31, 31, 32, 33, 29, 29,
46, 46, 33, 46, 57, 57, 46, 1, 29, 29, 32, 29, 37, 31, 31, 32,
51, 46, 51, 46, 46, 58, 51, 46, 33, 29, 29, 29, 29, 32, 29, 21,
51, 46, 51, 46, 46, 46, 51, 46, 21, 22, 38, 0, 0, 0, 0, 22,
33, 46, 59, 46, 57, 57, 46, 1, 0, 40, 39, 42, 43, 44, 45, 46,
51, 46, 46, 46, 46, 46, 33, 46, 47, 22, 23, 48, 49, 49, 24, 22,
33, 46, 46, 46, 57, 57, 46, 1, 50, 51, 52, 53, 54, 41, 56, 57,
51, 46, 46, 46, 46, 46, 33, 46, 58, 59, 4, 5, 60, 55, 55, 8,
33, 46, 46, 46, 57, 56, 46, 1, 4, 55, 55, 61, 55, 62, 57, 63,
51, 46, 46, 46, 46, 46, 33, 46, 63, 4, 5, 60, 55, 55, 55, 4,
60, 61, 62, 62, 4, 1, 51, 46, 55, 55, 61, 55, 57, 63, 63, 4,
61, 62, 62, 4, 1, 51, 46, 62, 5, 60, 55, 55, 55, 4, 55, 55,
62, 4, 1, 51, 46, 63, 64, 64, 61, 55, 42, 55, 55, 55, 64, 65,
4, 1, 51, 46, 55, 65, 46, 1, 55, 1, 60, 55, 55, 55, 55, 55,
51, 46, 55, 46, 57, 57, 46, 1, 42, 55, 66, 66, 55, 1, 60, 55,
51, 46, 57, 65, 46, 1, 51, 46, 60, 55, 55, 67, 60, 55, 60, 55,
47, 48, 54, 54, 4, 1, 51, 46, 60, 55, 55, 55, 60, 55, 42, 55,
46, 46, 46, 46, 46, 52, 46, 47, 68, 55, 66, 66, 55, 1, 60, 55,
48, 49, 54, 4, 1, 51, 46, 46, 55, 55, 55, 55, 42, 55, 42, 55,
6, 46, 46, 46, 52, 46, 67, 68, 55, 55, 66, 66, 55, 1, 60, 55,
69, 70, 10, 11, 71, 66, 66, 14, 55, 55, 55, 55, 42, 55, 42, 55,
66, 66, 66, 72, 66, 73, 68, 74, 55, 55, 66, 65, 55, 1, 60, 55,
70, 10, 11, 71, 66, 66, 66, 66, 55, 55, 55, 55, 42, 55, 69, 70,
66, 66, 72, 66, 68, 74, 70, 10, 71, 71, 4, 5, 60, 55, 55, 55,
11, 71, 66, 66, 66, 66, 66, 66, 4, 55, 70, 71, 71, 4, 5, 60,
72, 66, 75, 66, 66, 66, 76, 77, 55, 55, 55, 4, 55, 71, 71, 4,
66, 11, 71, 66, 66, 66, 66, 66, 5, 60, 55, 55, 55, 4, 55, 60,
75, 66, 78, 68, 79, 80, 10, 11, 55, 55, 67, 60, 55, 55, 55, 4,
71, 66, 66, 13, 66, 66, 66, 72, 55, 72, 73, 73, 4, 5, 60, 55,
66, 81, 68, 74, 74, 10, 11, 71, 55, 55, 4, 55, 64, 74, 55, 1,
66, 66, 66, 66, 66, 66, 72, 66, 60, 55, 64, 55, 66, 66, 55, 1,
68, 74, 74, 10, 11, 71, 66, 66, 60, 55, 66, 74, 55, 1, 60, 55,
66, 66, 66, 66, 72, 66, 75, 66, 56, 57, 63, 63, 4, 5, 60, 55,
66, 66, 82, 77, 66, 11, 71, 66, 55, 55, 4, 55, 55, 61, 55, 56,
66, 66, 66, 66, 75, 66, 71, 66, 57, 58, 63, 4, 5, 60, 55, 55,
66, 83, 71, 66, 71, 66, 71, 66, 8, 4, 55, 55, 61, 55, 76, 77,
66, 66, 71, 66, 75, 66, 84, 66, 78, 79, 12, 13, 80, 75, 75, 18,
82, 82, 66, 11, 71, 66, 66, 66, 12, 75, 75, 81, 75, 82, 77, 83,
66, 66, 75, 66, 75, 66, 66, 66, 79, 12, 13, 80, 75, 75, 75, 12,
82, 82, 66, 11, 71, 66, 66, 66, 75, 75, 81, 75, 77, 83, 79, 12,
66, 66, 75, 66, 85, 86, 87, 87, 13, 80, 75, 75, 75, 12, 75, 75,
10, 11, 71, 66, 86, 87, 87, 10, 81, 75, 84, 75, 75, 75, 85, 86,
11, 71, 66, 87, 87, 10, 11, 71, 75, 14, 80, 75, 75, 75, 75, 75,
66, 88, 89, 89, 10, 11, 71, 66, 84, 75, 87, 77, 88, 89, 12, 13,
76, 90, 66, 11, 71, 66, 82, 82, 80, 75, 75, 17, 12, 75, 75, 81,
66, 11, 71, 66, 76, 66, 82, 82, 75, 90, 77, 83, 83, 12, 13, 80,
66, 11, 71, 66, 82, 90, 66, 11, 75, 75, 75, 12, 75, 75, 81, 75,
71, 66, 78, 68, 74, 74, 10, 11, 77, 83, 83, 12, 13, 80, 75, 75,
71, 66, 66, 66, 66, 66, 66, 72, 75, 12, 75, 75, 81, 75, 84, 75,
66, 78, 68, 79, 74, 10, 11, 71, 75, 75, 91, 86, 75, 14, 80, 75,
66, 66, 13, 66, 66, 66, 72, 66, 75, 75, 75, 75, 84, 75, 80, 75,
8, 9, 9, 10, 11, 66, 67, 68, 75, 92, 80, 75, 80, 75, 80, 75,
74, 70, 10, 11, 71, 66, 66, 66, 75, 75, 80, 75, 84, 75, 93, 75,
66, 66, 66, 72, 66, 92, 36, 93, 91, 91, 75, 14, 80, 75, 75, 75,
93, 18, 19, 39, 91, 91, 91, 91, 75, 75, 84, 75, 84, 75, 75, 75,
91, 91, 43, 91, 36, 93, 93, 18, 91, 91, 75, 14, 80, 75, 75, 75,
19, 39, 91, 91, 91, 91, 91, 91, 75, 75, 84, 75, 94, 95, 96, 96,
43, 91, 94, 91, 91, 91, 95, 96, 12, 13, 80, 75, 75, 75, 12, 75,
91, 19, 39, 91, 91, 91, 91, 91, 95, 96, 96, 12, 13, 80, 75, 75,
94, 91, 35, 36, 97, 98, 18, 19, 75, 12, 75, 96, 96, 12, 13, 80,
39, 91, 91, 20, 91, 91, 91, 43, 75, 75, 75, 12, 75, 80, 75, 75,
91, 94, 91, 91, 91, 99, 96, 91, 92, 80, 75, 75, 75, 12, 75, 97,
19, 39, 91, 91, 91, 91, 91, 94, 98, 98, 12, 13, 80, 75, 75, 75,
91, 39, 91, 91, 100, 39, 91, 39, 12, 75, 85, 99, 75, 14, 80, 75,
91, 39, 91, 91, 91, 39, 91, 94, 91, 91, 75, 14, 80, 75, 85, 75,
91, 101, 91, 99, 99, 91, 19, 39, 91, 91, 75, 14, 80, 75, 91, 99,
91, 91, 91, 91, 91, 94, 91, 94, 75, 14, 80, 75, 87, 77, 83, 83,
91, 91, 91, 99, 99, 91, 19, 39, 12, 13, 80, 75, 75, 75, 12, 75,
91, 91, 91, 91, 91, 94, 91, 102, 75, 81, 75, 87, 77, 88, 83, 12,
103, 104, 104, 18, 19, 39, 91, 103, 13, 80, 75, 75, 17, 12, 75, 75,
104, 104, 18, 19, 39, 91, 104, 104, 81, 75, 10, 11, 11, 12, 13, 75,
18, 19, 39, 91, 35, 36, 93, 93, 75, 75, 75, 12, 75, 76, 77, 83,
18, 19, 39, 91, 91, 91, 91, 91, 79, 12, 13, 80, 75, 75, 75, 12,
91, 43, 91, 105, 106, 106, 18, 19, 75, 75, 81, 75, 101, 45, 102, 102,
39, 91, 95, 107, 91, 19, 39, 91, 22, 23, 48, 100, 100, 100, 22, 100,
99, 99, 91, 19, 39, 91, 95, 91, 100, 52, 100, 45, 102, 102, 22, 23,
99, 99, 91, 19, 39, 91, 99, 107, 48, 100, 100, 100, 22, 100, 100, 52,
91, 19, 39, 91, 35, 36, 97, 93, 100, 103, 100, 100, 100, 104, 105, 100,
18, 19, 39, 91, 91, 20, 91, 91, 25, 48, 100, 100, 100, 100, 100, 103,
91, 43, 91, 16, 17, 17, 18, 19, 100, 44, 45, 106, 107, 22, 23, 48,
108, 108, 108, 20, 108, 16, 17, 17, 100, 100, 24, 22, 100, 100, 52, 100,
18, 19, 108, 110, 111, 112, 113, 26, 103, 100, 100, 100, 108, 105, 100, 25,
27, 114, 109, 109, 28, 109, 109, 109, 48, 100, 100, 100, 100, 100, 103, 100,
115, 109, 116, 111, 113, 113, 26, 27, 48, 100, 100, 109, 48, 100, 48, 100,
114, 109, 109, 109, 109, 109, 109, 115, 48, 100, 100, 100, 48, 100, 103, 100,
109, 111, 113, 113, 26, 27, 114, 109, 110, 100, 108, 108, 100, 25, 48, 100,
109, 109, 109, 109, 109, 115, 109, 117, 100, 100, 100, 100, 103, 100, 103, 100,
109, 109, 109, 118, 119, 109, 27, 114, 100, 100, 108, 108, 100, 25, 48, 100,
109, 109, 109, 109, 109, 117, 109, 110, 100, 100, 100, 100, 103, 100, 111, 112,
111, 112, 40, 26, 27, 114, 109, 109, 113, 113, 22, 23, 48, 100, 100, 100,
28, 109, 109, 109, 115, 109, 117, 109, 22, 100, 112, 113, 113, 22, 23, 48,
109, 109, 120, 119, 109, 27, 114, 109, 100, 100, 100, 22, 100, 113, 113, 22,
109, 109, 109, 109, 117, 109, 114, 109, 23, 48, 100, 100, 100, 22, 100, 48,
109, 121, 114, 109, 114, 109, 114, 109, 100, 100, 109, 48, 100, 100, 100, 22,
109, 109, 114, 109, 117, 109, 122, 109, 100, 44, 45, 102, 102, 22, 23, 48,
120, 120, 109, 27, 114, 109, 109, 109, 100, 100, 100, 22, 100, 100, 52, 100,
109, 109, 117, 109, 117, 109, 109, 109, 114, 115, 115, 22, 23, 48, 100, 100,
120, 120, 109, 27, 114, 109, 109, 109, 100, 22, 100, 104, 116, 100, 25, 48,
109, 109, 117, 109, 123, 124, 125, 125, 100, 108, 108, 100, 25, 48, 100, 104,
26, 27, 114, 109, 124, 125, 125, 26, 100, 108, 108, 100, 25, 48, 100, 108,
27, 114, 109, 125, 125, 26, 27, 114, 116, 100, 25, 48, 100, 44, 45, 106,
109, 110, 111, 113, 113, 26, 27, 114, 102, 22, 23, 48, 100, 100, 24, 22,
109, 109, 109, 109, 109, 109, 115, 109, 100, 100, 52, 100, 20, 21, 21, 22,
126, 127, 127, 26, 27, 114, 109, 118, 23, 117, 117, 117, 24, 22, 117, 20,
128, 109, 27, 114, 109, 120, 120, 109, 21, 21, 22, 23, 117, 117, 117, 117,
27, 114, 109, 118, 109, 120, 120, 109, 22, 117, 119, 120, 121, 122, 32, 33,
27, 114, 109, 120, 128, 109, 27, 114, 123, 118, 118, 34, 32, 118, 118, 124,
109, 33, 34, 35, 36, 97, 93, 18, 118, 125, 120, 122, 122, 32, 33, 123,
19, 39, 40, 40, 20, 91, 91, 33, 118, 118, 118, 32, 118, 118, 124, 118,
43, 91, 47, 129, 49, 50, 4, 1, 120, 122, 122, 32, 33, 123, 118, 118,
51, 46, 46, 6, 46, 46, 46, 52, 118, 32, 118, 118, 124, 118, 126, 118,
46, 33, 34, 35, 36, 130, 131, 18, 118, 118, 127, 128, 118, 35, 123, 118,
132, 133, 46, 40, 20, 46, 46, 33, 118, 118, 118, 118, 126, 118, 119, 120,
43, 46, 16, 134, 134, 18, 132, 51, 121, 49, 32, 33, 123, 118, 118, 34,
46, 46, 20, 46, 133, 46, 46, 135, 32, 118, 118, 124, 118, 126, 118, 118,
133, 46, 133, 46, 133, 46, 46, 46, 118, 129, 128, 118, 35, 123, 118, 118,
133, 46, 33, 46, 59, 16, 134, 134, 118, 118, 118, 126, 118, 123, 118, 118,
18, 132, 51, 46, 46, 46, 46, 46, 130, 123, 118, 123, 118, 123, 118, 118,
33, 46, 137, 136, 138, 138, 136, 31, 118, 123, 118, 126, 118, 131, 118, 129,
139, 136, 138, 138, 136, 31, 139, 136, 129, 118, 35, 123, 118, 118, 118, 118,
139, 136, 136, 140, 139, 136, 139, 136, 118, 126, 118, 126, 118, 118, 118, 129,
139, 136, 136, 136, 139, 136, 33, 108, 129, 118, 35, 123, 118, 118, 118, 118,
108, 108, 108, 108, 108, 108, 108, 40, 118, 126, 118, 132, 133, 134, 134, 32,
108, 108, 108, 108, 33, 108, 0 33, 123, 118, 118, 118, 32, 118, 133,
134, 134, 32, 33, 123, 118, 118, 118,
32, 118, 134, 134, 32, 33, 123, 118,
118, 118, 32, 118, 123, 118, 118, 130,
123, 118, 118, 118, 32, 118, 119, 120,
122, 122, 32, 33, 123, 118, 118, 118,
32, 118, 118, 124, 118, 135, 136, 136,
32, 33, 123, 118, 118, 118, 32, 118,
127, 137, 118, 35, 123, 118, 129, 129,
118, 35, 123, 118, 127, 118, 129, 129,
118, 35, 123, 118, 129, 137, 118, 35,
123, 118, 42, 43, 44, 45, 106, 102,
22, 23, 48, 49, 49, 24, 22, 100,
42, 52, 100, 56, 138, 58, 59, 4,
5, 60, 55, 55, 8, 4, 55, 55,
61, 55, 42, 43, 44, 45, 139, 140,
22, 141, 142, 55, 49, 24, 22, 55,
42, 52, 55, 20, 143, 143, 22, 141,
60, 55, 55, 24, 22, 55, 60, 55,
55, 67, 60, 55, 55, 55, 22, 55,
142, 55, 55, 144, 142, 55, 55, 55,
22, 55, 142, 55, 142, 55, 55, 55,
142, 55, 42, 55, 68, 20, 143, 143,
22, 141, 60, 55, 55, 55, 22, 55,
42, 55, 146, 145, 147, 147, 145, 40,
148, 145, 147, 147, 145, 40, 148, 145,
148, 145, 145, 149, 148, 145, 148, 145,
148, 145, 145, 145, 148, 145, 42, 117,
117, 117, 117, 117, 117, 117, 117, 49,
117, 117, 117, 117, 42, 117, 0
}; };
static const unsigned char _indic_syllable_machine_trans_targs[] = { static const unsigned char _indic_syllable_machine_trans_targs[] = {
27, 33, 38, 2, 39, 45, 46, 27, 31, 37, 42, 2, 43, 46, 4, 50,
55, 8, 61, 56, 68, 69, 72, 27, 51, 31, 60, 9, 66, 69, 61, 11,
77, 15, 83, 78, 86, 27, 91, 27, 74, 75, 78, 31, 83, 17, 89, 92,
100, 21, 106, 101, 109, 114, 27, 125, 93, 84, 31, 19, 98, 31, 107, 24,
27, 28, 48, 73, 75, 93, 94, 79, 113, 116, 117, 108, 26, 122, 127, 31,
95, 115, 116, 87, 123, 128, 27, 29, 134, 31, 32, 53, 79, 81, 100, 101,
31, 5, 47, 34, 42, 30, 1, 32, 85, 102, 123, 124, 94, 132, 137, 31,
36, 0, 35, 37, 40, 41, 3, 43, 33, 35, 6, 52, 38, 47, 34, 1,
4, 44, 27, 49, 51, 12, 71, 57, 36, 40, 0, 39, 41, 44, 45, 3,
64, 50, 6, 52, 66, 59, 53, 11, 48, 5, 49, 31, 54, 56, 14, 77,
70, 54, 7, 58, 60, 62, 63, 9, 62, 70, 55, 7, 57, 72, 64, 58,
65, 10, 67, 27, 74, 17, 76, 89, 13, 76, 59, 8, 63, 65, 67, 68,
81, 13, 92, 14, 80, 82, 84, 85, 10, 71, 12, 73, 31, 80, 20, 82,
16, 88, 18, 90, 27, 27, 96, 98, 96, 87, 15, 99, 16, 86, 88, 90,
19, 23, 102, 110, 97, 99, 112, 104, 91, 18, 95, 21, 97, 31, 31, 103,
20, 103, 105, 107, 108, 22, 111, 24, 105, 22, 27, 109, 118, 104, 106, 120,
113, 117, 118, 122, 119, 120, 25, 121, 111, 23, 110, 112, 114, 115, 25, 119,
27, 124, 26, 126, 127 28, 121, 125, 126, 131, 128, 129, 29,
130, 31, 133, 30, 135, 136
}; };
static const char _indic_syllable_machine_trans_actions[] = { static const char _indic_syllable_machine_trans_actions[] = {
1, 0, 2, 0, 2, 2, 2, 3, 1, 0, 2, 0, 2, 0, 0, 2,
2, 0, 2, 0, 2, 2, 2, 4, 2, 3, 2, 0, 2, 0, 0, 0,
2, 0, 5, 0, 5, 6, 2, 7, 2, 2, 2, 4, 2, 0, 5, 0,
2, 0, 2, 0, 2, 2, 8, 0, 5, 0, 6, 0, 2, 7, 2, 0,
11, 2, 2, 5, 0, 12, 12, 0, 2, 0, 2, 0, 0, 2, 0, 8,
2, 5, 2, 5, 2, 0, 13, 2, 0, 11, 2, 2, 5, 0, 12, 12,
0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 5, 2, 5, 2, 0, 13,
2, 0, 0, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 2, 2, 0,
0, 2, 14, 2, 0, 0, 2, 0,
2, 2, 0, 2, 2, 2, 2, 0,
2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 0, 0, 2, 2, 2, 0,
0, 0, 2, 15, 5, 0, 5, 2, 0, 0, 2, 14, 2, 0, 0, 2,
2, 0, 5, 0, 0, 2, 5, 5, 0, 2, 2, 0, 2, 2, 2, 2,
0, 0, 0, 2, 16, 17, 2, 0, 0, 2, 2, 0, 0, 2, 2, 2,
0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 2, 15, 5, 0, 5,
0, 0, 2, 2, 2, 0, 0, 0, 2, 2, 0, 5, 0, 0, 2, 5,
2, 0, 18, 18, 0, 0, 0, 0, 5, 0, 0, 0, 2, 16, 17, 2,
19, 2, 0, 0, 0 0, 0, 0, 0, 2, 2, 2, 2,
2, 0, 0, 2, 2, 2, 0, 0,
0, 2, 0, 18, 18, 0, 0, 0,
0, 19, 2, 0, 0, 0
}; };
static const char _indic_syllable_machine_to_state_actions[] = { static const char _indic_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, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
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,
@ -349,14 +384,15 @@ static const char _indic_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, 0, 0, 0, 0, 0,
0, 0
}; };
static const char _indic_syllable_machine_from_state_actions[] = { static const char _indic_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, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
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,
@ -369,41 +405,43 @@ static const char _indic_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, 0, 0, 0, 0, 0,
0, 0
}; };
static const short _indic_syllable_machine_eof_trans[] = { static const short _indic_syllable_machine_eof_trans[] = {
1, 1, 1, 1, 1, 1, 8, 8, 1, 1, 1, 1, 1, 1, 1, 10,
8, 8, 8, 8, 8, 16, 16, 22, 10, 10, 10, 10, 10, 10, 10, 20,
16, 16, 16, 24, 24, 24, 24, 24, 20, 27, 20, 27, 20, 20, 30, 30,
24, 1, 31, 0, 47, 47, 47, 47, 30, 30, 30, 30, 30, 1, 40, 0,
47, 47, 47, 47, 47, 47, 47, 47, 56, 56, 56, 56, 56, 56, 56, 56,
47, 47, 47, 47, 47, 47, 47, 47, 56, 56, 56, 56, 56, 56, 56, 56,
67, 67, 67, 67, 67, 67, 67, 67, 56, 56, 56, 56, 56, 76, 76, 76,
67, 67, 67, 67, 67, 67, 67, 67, 76, 76, 76, 76, 76, 76, 76, 76,
67, 67, 67, 67, 67, 67, 67, 67, 76, 76, 76, 76, 76, 76, 76, 76,
67, 92, 92, 92, 92, 92, 92, 92, 76, 76, 76, 76, 76, 76, 76, 101,
92, 92, 92, 92, 92, 92, 92, 92, 101, 101, 101, 101, 101, 101, 101, 101,
92, 92, 92, 92, 92, 109, 109, 110, 101, 101, 101, 101, 101, 101, 101, 101,
110, 110, 110, 110, 110, 110, 110, 110, 101, 101, 101, 101, 118, 118, 119, 119,
110, 110, 110, 110, 110, 110, 110, 110, 119, 119, 119, 119, 119, 119, 119, 119,
110, 110, 110, 92, 47, 47, 47, 47, 119, 119, 119, 119, 119, 119, 119, 119,
47, 47, 47, 137, 137, 137, 137, 137, 119, 119, 119, 101, 56, 56, 56, 56,
109 56, 56, 56, 56, 146, 146, 146, 146,
146, 118
}; };
static const int indic_syllable_machine_start = 27; static const int indic_syllable_machine_start = 31;
static const int indic_syllable_machine_first_final = 27; static const int indic_syllable_machine_first_final = 31;
static const int indic_syllable_machine_error = -1; static const int indic_syllable_machine_error = -1;
static const int indic_syllable_machine_en_main = 27; static const int indic_syllable_machine_en_main = 31;
#line 58 "hb-ot-shaper-indic-machine.rl" #line 58 "hb-ot-shaper-indic-machine.rl"
#line 117 "hb-ot-shaper-indic-machine.rl" #line 118 "hb-ot-shaper-indic-machine.rl"
#define found_syllable(syllable_type) \ #define found_syllable(syllable_type) \
@ -422,7 +460,7 @@ find_syllables_indic (hb_buffer_t *buffer)
int cs; int cs;
hb_glyph_info_t *info = buffer->info; hb_glyph_info_t *info = buffer->info;
#line 415 "hb-ot-shaper-indic-machine.hh" #line 464 "hb-ot-shaper-indic-machine.hh"
{ {
cs = indic_syllable_machine_start; cs = indic_syllable_machine_start;
ts = 0; ts = 0;
@ -430,7 +468,7 @@ find_syllables_indic (hb_buffer_t *buffer)
act = 0; act = 0;
} }
#line 137 "hb-ot-shaper-indic-machine.rl" #line 138 "hb-ot-shaper-indic-machine.rl"
p = 0; p = 0;
@ -438,7 +476,7 @@ find_syllables_indic (hb_buffer_t *buffer)
unsigned int syllable_serial = 1; unsigned int syllable_serial = 1;
#line 427 "hb-ot-shaper-indic-machine.hh" #line 480 "hb-ot-shaper-indic-machine.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@ -452,7 +490,7 @@ _resume:
#line 1 "NONE" #line 1 "NONE"
{ts = p;} {ts = p;}
break; break;
#line 439 "hb-ot-shaper-indic-machine.hh" #line 494 "hb-ot-shaper-indic-machine.hh"
} }
_keys = _indic_syllable_machine_trans_keys + (cs<<1); _keys = _indic_syllable_machine_trans_keys + (cs<<1);
@ -475,51 +513,51 @@ _eof_trans:
{te = p+1;} {te = p+1;}
break; break;
case 11: case 11:
#line 113 "hb-ot-shaper-indic-machine.rl" #line 114 "hb-ot-shaper-indic-machine.rl"
{te = p+1;{ found_syllable (indic_non_indic_cluster); }} {te = p+1;{ found_syllable (indic_non_indic_cluster); }}
break; break;
case 13: case 13:
#line 108 "hb-ot-shaper-indic-machine.rl" #line 109 "hb-ot-shaper-indic-machine.rl"
{te = p;p--;{ found_syllable (indic_consonant_syllable); }} {te = p;p--;{ found_syllable (indic_consonant_syllable); }}
break; break;
case 14: case 14:
#line 109 "hb-ot-shaper-indic-machine.rl" #line 110 "hb-ot-shaper-indic-machine.rl"
{te = p;p--;{ found_syllable (indic_vowel_syllable); }} {te = p;p--;{ found_syllable (indic_vowel_syllable); }}
break; break;
case 17: case 17:
#line 110 "hb-ot-shaper-indic-machine.rl" #line 111 "hb-ot-shaper-indic-machine.rl"
{te = p;p--;{ found_syllable (indic_standalone_cluster); }} {te = p;p--;{ found_syllable (indic_standalone_cluster); }}
break; break;
case 19: case 19:
#line 111 "hb-ot-shaper-indic-machine.rl" #line 112 "hb-ot-shaper-indic-machine.rl"
{te = p;p--;{ found_syllable (indic_symbol_cluster); }} {te = p;p--;{ found_syllable (indic_symbol_cluster); }}
break; break;
case 15: case 15:
#line 112 "hb-ot-shaper-indic-machine.rl" #line 113 "hb-ot-shaper-indic-machine.rl"
{te = p;p--;{ found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} {te = p;p--;{ found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
break; break;
case 16: case 16:
#line 113 "hb-ot-shaper-indic-machine.rl" #line 114 "hb-ot-shaper-indic-machine.rl"
{te = p;p--;{ found_syllable (indic_non_indic_cluster); }} {te = p;p--;{ found_syllable (indic_non_indic_cluster); }}
break; break;
case 1: case 1:
#line 108 "hb-ot-shaper-indic-machine.rl" #line 109 "hb-ot-shaper-indic-machine.rl"
{{p = ((te))-1;}{ found_syllable (indic_consonant_syllable); }} {{p = ((te))-1;}{ found_syllable (indic_consonant_syllable); }}
break; break;
case 3: case 3:
#line 109 "hb-ot-shaper-indic-machine.rl" #line 110 "hb-ot-shaper-indic-machine.rl"
{{p = ((te))-1;}{ found_syllable (indic_vowel_syllable); }} {{p = ((te))-1;}{ found_syllable (indic_vowel_syllable); }}
break; break;
case 7: case 7:
#line 110 "hb-ot-shaper-indic-machine.rl" #line 111 "hb-ot-shaper-indic-machine.rl"
{{p = ((te))-1;}{ found_syllable (indic_standalone_cluster); }} {{p = ((te))-1;}{ found_syllable (indic_standalone_cluster); }}
break; break;
case 8: case 8:
#line 111 "hb-ot-shaper-indic-machine.rl" #line 112 "hb-ot-shaper-indic-machine.rl"
{{p = ((te))-1;}{ found_syllable (indic_symbol_cluster); }} {{p = ((te))-1;}{ found_syllable (indic_symbol_cluster); }}
break; break;
case 4: case 4:
#line 112 "hb-ot-shaper-indic-machine.rl" #line 113 "hb-ot-shaper-indic-machine.rl"
{{p = ((te))-1;}{ found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} {{p = ((te))-1;}{ found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
break; break;
case 6: case 6:
@ -540,22 +578,22 @@ _eof_trans:
case 18: case 18:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 108 "hb-ot-shaper-indic-machine.rl" #line 109 "hb-ot-shaper-indic-machine.rl"
{act = 1;} {act = 1;}
break; break;
case 5: case 5:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 112 "hb-ot-shaper-indic-machine.rl" #line 113 "hb-ot-shaper-indic-machine.rl"
{act = 5;} {act = 5;}
break; break;
case 12: case 12:
#line 1 "NONE" #line 1 "NONE"
{te = p+1;} {te = p+1;}
#line 113 "hb-ot-shaper-indic-machine.rl" #line 114 "hb-ot-shaper-indic-machine.rl"
{act = 6;} {act = 6;}
break; break;
#line 521 "hb-ot-shaper-indic-machine.hh" #line 597 "hb-ot-shaper-indic-machine.hh"
} }
_again: _again:
@ -564,7 +602,7 @@ _again:
#line 1 "NONE" #line 1 "NONE"
{ts = 0;} {ts = 0;}
break; break;
#line 528 "hb-ot-shaper-indic-machine.hh" #line 606 "hb-ot-shaper-indic-machine.hh"
} }
if ( ++p != pe ) if ( ++p != pe )
@ -580,7 +618,7 @@ _again:
} }
#line 145 "hb-ot-shaper-indic-machine.rl" #line 146 "hb-ot-shaper-indic-machine.rl"
} }

View File

@ -74,6 +74,7 @@ export VD = 9;
export PLACEHOLDER = 10; export PLACEHOLDER = 10;
export DOTTEDCIRCLE = 11; export DOTTEDCIRCLE = 11;
export RS = 12; export RS = 12;
export MPst = 13;
export Repha = 14; export Repha = 14;
export Ra = 15; export Ra = 15;
export CM = 16; export CM = 16;
@ -88,7 +89,7 @@ reph = (Ra H | Repha); # possible reph
cn = c.ZWJ?.n?; cn = c.ZWJ?.n?;
symbol = Symbol.N?; symbol = Symbol.N?;
matra_group = z*.M.N?.H?; matra_group = z*.(M | SM? MPst).N?.H?;
syllable_tail = (z?.SM.SM?.ZWNJ?)? (A | VD)*; syllable_tail = (z?.SM.SM?.ZWNJ?)? (A | VD)*;
halant_group = (z?.H.(ZWJ.N?)?); halant_group = (z?.H.(ZWJ.N?)?);
final_halant_group = halant_group | H.ZWNJ; final_halant_group = halant_group | H.ZWNJ;

View File

@ -42,6 +42,7 @@
#define OT_PLACEHOLDER I_Cat(PLACEHOLDER) #define OT_PLACEHOLDER I_Cat(PLACEHOLDER)
#define OT_DOTTEDCIRCLE I_Cat(DOTTEDCIRCLE) #define OT_DOTTEDCIRCLE I_Cat(DOTTEDCIRCLE)
#define OT_RS I_Cat(RS) #define OT_RS I_Cat(RS)
#define OT_MPst I_Cat(MPst)
#define OT_Repha I_Cat(Repha) #define OT_Repha I_Cat(Repha)
#define OT_Ra I_Cat(Ra) #define OT_Ra I_Cat(Ra)
#define OT_CM I_Cat(CM) #define OT_CM I_Cat(CM)
@ -80,9 +81,10 @@ static_assert (OT_VPst == M_Cat(VPst), "");
#define _OT_CS OT_CS /* 2 chars; CS */ #define _OT_CS OT_CS /* 2 chars; CS */
#define _OT_DC OT_DOTTEDCIRCLE /* 1 chars; DOTTEDCIRCLE */ #define _OT_DC OT_DOTTEDCIRCLE /* 1 chars; DOTTEDCIRCLE */
#define _OT_H OT_H /* 11 chars; H */ #define _OT_H OT_H /* 11 chars; H */
#define _OT_M OT_M /* 143 chars; M */ #define _OT_M OT_M /* 142 chars; M */
#define _OT_MH OT_MH /* 1 chars; MH */ #define _OT_MH OT_MH /* 1 chars; MH */
#define _OT_ML OT_ML /* 1 chars; ML */ #define _OT_ML OT_ML /* 1 chars; ML */
#define _OT_MP OT_MPst /* 1 chars; MPst */
#define _OT_MR OT_MR /* 1 chars; MR */ #define _OT_MR OT_MR /* 1 chars; MR */
#define _OT_MW OT_MW /* 2 chars; MW */ #define _OT_MW OT_MW /* 2 chars; MW */
#define _OT_MY OT_MY /* 3 chars; MY */ #define _OT_MY OT_MY /* 3 chars; MY */
@ -200,7 +202,7 @@ static const uint16_t indic_table[] = {
/* 0A28 */ _(C,C), _(X,X), _(C,C), _(C,C), _(C,C), _(C,C), _(C,C), _(C,C), /* 0A28 */ _(C,C), _(X,X), _(C,C), _(C,C), _(C,C), _(C,C), _(C,C), _(C,C),
/* 0A30 */ _(R,C), _(X,X), _(C,C), _(C,C), _(X,X), _(C,C), _(C,C), _(X,X), /* 0A30 */ _(R,C), _(X,X), _(C,C), _(C,C), _(X,X), _(C,C), _(C,C), _(X,X),
/* 0A38 */ _(C,C), _(C,C), _(X,X), _(X,X), _(N,X), _(X,X), _(M,AP), _(M,LM), /* 0A38 */ _(C,C), _(C,C), _(X,X), _(X,X), _(N,X), _(X,X), _(M,AP), _(M,LM),
/* 0A40 */ _(M,AP), _(M,AP), _(M,AP), _(X,X), _(X,X), _(X,X), _(X,X), _(M,AP), /* 0A40 */_(MP,AP), _(M,AP), _(M,AP), _(X,X), _(X,X), _(X,X), _(X,X), _(M,AP),
/* 0A48 */ _(M,AP), _(X,X), _(X,X), _(M,AP), _(M,AP), _(H,B), _(X,X), _(X,X), /* 0A48 */ _(M,AP), _(X,X), _(X,X), _(M,AP), _(M,AP), _(H,B), _(X,X), _(X,X),
/* 0A50 */ _(X,X), _(M,B), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), /* 0A50 */ _(X,X), _(M,B), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X),
/* 0A58 */ _(X,X), _(C,C), _(C,C), _(C,C), _(C,C), _(X,X), _(C,C), _(X,X), /* 0A58 */ _(X,X), _(C,C), _(C,C), _(C,C), _(C,C), _(X,X), _(C,C), _(X,X),
@ -517,6 +519,7 @@ hb_indic_get_categories (hb_codepoint_t u)
#undef _OT_M #undef _OT_M
#undef _OT_MH #undef _OT_MH
#undef _OT_ML #undef _OT_ML
#undef _OT_MP
#undef _OT_MR #undef _OT_MR
#undef _OT_MW #undef _OT_MW
#undef _OT_MY #undef _OT_MY

View File

@ -715,6 +715,9 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
} }
} }
} else if (info[i].indic_position() != POS_SMVD) { } else if (info[i].indic_position() != POS_SMVD) {
if (info[i].indic_category() == I_Cat(MPst) &&
i > start && info[i - 1].indic_category() == I_Cat(SM))
info[i - 1].indic_position() = info[i].indic_position();
last_pos = (indic_position_t) info[i].indic_position(); last_pos = (indic_position_t) info[i].indic_position();
} }
} }
@ -730,7 +733,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
if (info[j].indic_position() < POS_SMVD) if (info[j].indic_position() < POS_SMVD)
info[j].indic_position() = info[i].indic_position(); info[j].indic_position() = info[i].indic_position();
last = i; last = i;
} else if (info[i].indic_category() == I_Cat(M)) } else if (FLAG_UNSAFE (info[i].indic_category()) & (FLAG (I_Cat(M)) | FLAG (I_Cat(MPst))))
last = i; last = i;
} }
@ -770,7 +773,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
/* Reverse back nuktas, etc. */ /* Reverse back nuktas, etc. */
unsigned i = first_left_matra; unsigned i = first_left_matra;
for (unsigned j = i; j <= last_left_matra; j++) for (unsigned j = i; j <= last_left_matra; j++)
if (info[j].indic_category() == I_Cat(M)) if (FLAG_UNSAFE (info[j].indic_category()) & (FLAG (I_Cat(M)) | FLAG (I_Cat(MPst))))
{ {
buffer->reverse_range (i, j + 1); buffer->reverse_range (i, j + 1);
i = j + 1; i = j + 1;
@ -1147,7 +1150,7 @@ final_reordering_syllable_indic (const hb_ot_shape_plan_t *plan,
{ {
search: search:
while (new_pos > start && while (new_pos > start &&
!(is_one_of (info[new_pos], (FLAG (I_Cat(M)) | FLAG (I_Cat(H)))))) !(is_one_of (info[new_pos], (FLAG (I_Cat(M)) | FLAG (I_Cat(MPst)) | FLAG (I_Cat(H))))))
new_pos--; new_pos--;
/* If we found no Halant we are done. /* If we found no Halant we are done.
@ -1347,7 +1350,8 @@ final_reordering_syllable_indic (const hb_ot_shape_plan_t *plan,
unlikely (is_halant (info[new_reph_pos]))) unlikely (is_halant (info[new_reph_pos])))
{ {
for (unsigned int i = base + 1; i < new_reph_pos; i++) for (unsigned int i = base + 1; i < new_reph_pos; i++)
if (info[i].indic_category() == I_Cat(M)) { if (FLAG_UNSAFE (info[i].indic_category()) & (FLAG (I_Cat(M)) | FLAG (I_Cat(MPst))))
{
/* Ok, got it. */ /* Ok, got it. */
new_reph_pos--; new_reph_pos--;
} }
@ -1407,7 +1411,7 @@ final_reordering_syllable_indic (const hb_ot_shape_plan_t *plan,
if (buffer->props.script != HB_SCRIPT_MALAYALAM && buffer->props.script != HB_SCRIPT_TAMIL) if (buffer->props.script != HB_SCRIPT_MALAYALAM && buffer->props.script != HB_SCRIPT_TAMIL)
{ {
while (new_pos > start && while (new_pos > start &&
!(is_one_of (info[new_pos - 1], FLAG(I_Cat(M)) | FLAG (I_Cat(H))))) !(is_one_of (info[new_pos - 1], FLAG (I_Cat(M)) | FLAG (I_Cat(MPst)) | FLAG (I_Cat(H)))))
new_pos--; new_pos--;
} }

View File

@ -4,3 +4,5 @@
../fonts/e716f6bd00a108d186b7e9f47b4515565f784f36.ttf;;U+0C1A,U+0C3F,U+0C32,U+0C4D,U+0C15,U+0C42,U+0C30,U+0C4D;[civoweltelu=0+766|latelu=2+709|uuvowelsigntelu=2+661|kasubscripttelu=2+483|rahalanttelu=6+593] ../fonts/e716f6bd00a108d186b7e9f47b4515565f784f36.ttf;;U+0C1A,U+0C3F,U+0C32,U+0C4D,U+0C15,U+0C42,U+0C30,U+0C4D;[civoweltelu=0+766|latelu=2+709|uuvowelsigntelu=2+661|kasubscripttelu=2+483|rahalanttelu=6+593]
../fonts/9d8c53cb64b8747abdd2b70755cce2ee0eb42ef7.ttf;;U+0915,U+093F,U+094E,U+093C;[uni094E=0+273|uni093C=0+0|ivowelsign03deva=0+259|uni0915=0+762] ../fonts/9d8c53cb64b8747abdd2b70755cce2ee0eb42ef7.ttf;;U+0915,U+093F,U+094E,U+093C;[uni094E=0+273|uni093C=0+0|ivowelsign03deva=0+259|uni0915=0+762]
../fonts/9d8c53cb64b8747abdd2b70755cce2ee0eb42ef7.ttf;;U+0915,U+093F,U+093C,U+094E;[uni094E=0+273|ivowelsign00deva=0+259|uni093C=0+0|uni0915=0+762] ../fonts/9d8c53cb64b8747abdd2b70755cce2ee0eb42ef7.ttf;;U+0915,U+093F,U+093C,U+094E;[uni094E=0+273|ivowelsign00deva=0+259|uni093C=0+0|uni0915=0+762]
../fonts/5f73fff1ffc07b5a99a90c0909609f2b09fef274.ttf;;U+0A15,U+0A40,U+0A02;[uni0A15=0+505|uni0A40=0+427|uni0A02=0+0]
../fonts/5f73fff1ffc07b5a99a90c0909609f2b09fef274.ttf;;U+0A15,U+0A02,U+0A40;[uni0A15=0+505|uni0A02=0+0|uni0A40=0+427]