[myanmar] Remove category D completely

Fixes https://github.com/harfbuzz/harfbuzz/issues/3651
This commit is contained in:
Behdad Esfahbod 2022-06-11 08:52:11 -06:00
parent 8533214ac5
commit b350e30186
3 changed files with 15 additions and 22 deletions

View File

@ -122,8 +122,6 @@ categories = {
'IV', 'IV',
'As', 'As',
'D',
'D0',
'DB', 'DB',
'GB ', 'GB ',
'MH', 'MH',

View File

@ -56,8 +56,6 @@ enum myanmar_syllable_type_t {
#define myanmar_syllable_machine_ex_As 32u #define myanmar_syllable_machine_ex_As 32u
#define myanmar_syllable_machine_ex_C 1u #define myanmar_syllable_machine_ex_C 1u
#define myanmar_syllable_machine_ex_CS 18u #define myanmar_syllable_machine_ex_CS 18u
#define myanmar_syllable_machine_ex_D 33u
#define myanmar_syllable_machine_ex_D0 34u
#define myanmar_syllable_machine_ex_DB 3u #define myanmar_syllable_machine_ex_DB 3u
#define myanmar_syllable_machine_ex_DOTTEDCIRCLE 11u #define myanmar_syllable_machine_ex_DOTTEDCIRCLE 11u
#define myanmar_syllable_machine_ex_GB 10u #define myanmar_syllable_machine_ex_GB 10u
@ -81,7 +79,7 @@ enum myanmar_syllable_type_t {
#define myanmar_syllable_machine_ex_ZWNJ 5u #define myanmar_syllable_machine_ex_ZWNJ 5u
#line 85 "hb-ot-shaper-myanmar-machine.hh" #line 83 "hb-ot-shaper-myanmar-machine.hh"
static const unsigned char _myanmar_syllable_machine_trans_keys[] = { static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
1u, 42u, 3u, 42u, 5u, 39u, 5u, 8u, 3u, 42u, 3u, 39u, 3u, 39u, 5u, 39u, 1u, 42u, 3u, 42u, 5u, 39u, 5u, 8u, 3u, 42u, 3u, 39u, 3u, 39u, 5u, 39u,
5u, 39u, 3u, 39u, 3u, 39u, 3u, 42u, 5u, 39u, 1u, 15u, 3u, 39u, 3u, 39u, 5u, 39u, 3u, 39u, 3u, 39u, 3u, 42u, 5u, 39u, 1u, 15u, 3u, 39u, 3u, 39u,
@ -89,7 +87,7 @@ static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
3u, 42u, 3u, 42u, 5u, 39u, 5u, 8u, 3u, 42u, 3u, 39u, 3u, 39u, 5u, 39u, 3u, 42u, 3u, 42u, 5u, 39u, 5u, 8u, 3u, 42u, 3u, 39u, 3u, 39u, 5u, 39u,
5u, 39u, 3u, 39u, 3u, 39u, 3u, 42u, 5u, 39u, 1u, 15u, 3u, 42u, 3u, 39u, 5u, 39u, 3u, 39u, 3u, 39u, 3u, 42u, 5u, 39u, 1u, 15u, 3u, 42u, 3u, 39u,
3u, 39u, 3u, 40u, 3u, 39u, 3u, 42u, 3u, 42u, 3u, 39u, 3u, 42u, 3u, 42u, 3u, 39u, 3u, 40u, 3u, 39u, 3u, 42u, 3u, 42u, 3u, 39u, 3u, 42u, 3u, 42u,
3u, 42u, 3u, 42u, 3u, 42u, 3u, 42u, 3u, 42u, 1u, 42u, 1u, 33u, 8u, 8u, 3u, 42u, 3u, 42u, 3u, 42u, 3u, 42u, 3u, 42u, 1u, 42u, 1u, 15u, 8u, 8u,
0 0
}; };
@ -100,7 +98,7 @@ static const char _myanmar_syllable_machine_key_spans[] = {
40, 40, 35, 4, 40, 37, 37, 35, 40, 40, 35, 4, 40, 37, 37, 35,
35, 37, 37, 40, 35, 15, 40, 37, 35, 37, 37, 40, 35, 15, 40, 37,
37, 38, 37, 40, 40, 37, 40, 40, 37, 38, 37, 40, 40, 37, 40, 40,
40, 40, 40, 40, 40, 42, 33, 1 40, 40, 40, 40, 40, 42, 15, 1
}; };
static const short _myanmar_syllable_machine_index_offsets[] = { static const short _myanmar_syllable_machine_index_offsets[] = {
@ -110,7 +108,7 @@ static const short _myanmar_syllable_machine_index_offsets[] = {
879, 920, 961, 997, 1002, 1043, 1081, 1119, 879, 920, 961, 997, 1002, 1043, 1081, 1119,
1155, 1191, 1229, 1267, 1308, 1344, 1360, 1401, 1155, 1191, 1229, 1267, 1308, 1344, 1360, 1401,
1439, 1477, 1516, 1554, 1595, 1636, 1674, 1715, 1439, 1477, 1516, 1554, 1595, 1636, 1674, 1715,
1756, 1797, 1838, 1879, 1920, 1961, 2004, 2038 1756, 1797, 1838, 1879, 1920, 1961, 2004, 2020
}; };
static const char _myanmar_syllable_machine_indicies[] = { static const char _myanmar_syllable_machine_indicies[] = {
@ -118,7 +116,7 @@ static const char _myanmar_syllable_machine_indicies[] = {
6, 1, 1, 0, 0, 0, 7, 0, 6, 1, 1, 0, 0, 0, 7, 0,
0, 8, 0, 9, 10, 11, 12, 0, 0, 8, 0, 9, 10, 11, 12, 0,
0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 13,
1, 0, 14, 15, 16, 17, 18, 19, 0, 0, 14, 15, 16, 17, 18, 19,
20, 21, 0, 23, 24, 25, 25, 22, 20, 21, 0, 23, 24, 25, 25, 22,
26, 27, 22, 22, 22, 22, 22, 22, 26, 27, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 28, 29, 30, 31, 22, 22, 22, 22, 28, 29, 30, 31,
@ -363,13 +361,10 @@ static const char _myanmar_syllable_machine_indicies[] = {
5, 6, 1, 1, 48, 48, 48, 1, 5, 6, 1, 1, 48, 48, 48, 1,
48, 48, 48, 48, 9, 10, 11, 12, 48, 48, 48, 48, 9, 10, 11, 12,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
13, 1, 48, 14, 15, 16, 17, 18, 13, 48, 48, 14, 15, 16, 17, 18,
19, 48, 21, 48, 1, 1, 61, 61, 19, 48, 21, 48, 1, 1, 61, 61,
61, 61, 61, 61, 61, 1, 1, 61, 61, 61, 61, 61, 61, 1, 1, 61,
61, 61, 1, 61, 61, 61, 61, 61, 61, 61, 1, 61, 62, 61, 0
61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 1, 61, 62, 61,
0
}; };
static const char _myanmar_syllable_machine_trans_targs[] = { static const char _myanmar_syllable_machine_trans_targs[] = {
@ -454,7 +449,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
int cs; int cs;
hb_glyph_info_t *info = buffer->info; hb_glyph_info_t *info = buffer->info;
#line 458 "hb-ot-shaper-myanmar-machine.hh" #line 453 "hb-ot-shaper-myanmar-machine.hh"
{ {
cs = myanmar_syllable_machine_start; cs = myanmar_syllable_machine_start;
ts = 0; ts = 0;
@ -470,7 +465,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
unsigned int syllable_serial = 1; unsigned int syllable_serial = 1;
#line 474 "hb-ot-shaper-myanmar-machine.hh" #line 469 "hb-ot-shaper-myanmar-machine.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@ -484,7 +479,7 @@ _resume:
#line 1 "NONE" #line 1 "NONE"
{ts = p;} {ts = p;}
break; break;
#line 488 "hb-ot-shaper-myanmar-machine.hh" #line 483 "hb-ot-shaper-myanmar-machine.hh"
} }
_keys = _myanmar_syllable_machine_trans_keys + (cs<<1); _keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
@ -534,7 +529,7 @@ _eof_trans:
#line 116 "hb-ot-shaper-myanmar-machine.rl" #line 116 "hb-ot-shaper-myanmar-machine.rl"
{te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }} {te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }}
break; break;
#line 538 "hb-ot-shaper-myanmar-machine.hh" #line 533 "hb-ot-shaper-myanmar-machine.hh"
} }
_again: _again:
@ -543,7 +538,7 @@ _again:
#line 1 "NONE" #line 1 "NONE"
{ts = 0;} {ts = 0;}
break; break;
#line 547 "hb-ot-shaper-myanmar-machine.hh" #line 542 "hb-ot-shaper-myanmar-machine.hh"
} }
if ( ++p != pe ) if ( ++p != pe )

View File

@ -58,6 +58,8 @@ enum myanmar_syllable_type_t {
%%{ %%{
# Spec category D is folded into GB; D0 is not implemented by Uniscribe and as such folded into D
export C = 1; export C = 1;
export IV = 2; export IV = 2;
export DB = 3; # Dot below = OT_N export DB = 3; # Dot below = OT_N
@ -78,8 +80,6 @@ export VPst = 23;
# 32+ are for Myanmar-specific values # 32+ are for Myanmar-specific values
export As = 32; # Asat export As = 32; # Asat
export D = 33; # Digits except zero
export D0 = 34; # Digit zero
export MH = 35; # Medial Ha export MH = 35; # Medial Ha
export MR = 36; # Medial Ra export MR = 36; # Medial Ra
export MW = 37; # Medial Wa, Shan Wa export MW = 37; # Medial Wa, Shan Wa
@ -103,7 +103,7 @@ pwo_tone_group = PT A* DB? As?;
complex_syllable_tail = As* medial_group main_vowel_group post_vowel_group* pwo_tone_group* SM* j?; complex_syllable_tail = As* medial_group main_vowel_group post_vowel_group* pwo_tone_group* SM* j?;
syllable_tail = (H (c|IV).VS?)* (H | complex_syllable_tail); syllable_tail = (H (c|IV).VS?)* (H | complex_syllable_tail);
consonant_syllable = (k|CS)? (c|IV|D|GB|DOTTEDCIRCLE).VS? syllable_tail; consonant_syllable = (k|CS)? (c|IV|GB|DOTTEDCIRCLE).VS? syllable_tail;
punctuation_cluster = P SM; punctuation_cluster = P SM;
broken_cluster = k? VS? syllable_tail; broken_cluster = k? VS? syllable_tail;
other = any; other = any;