[USE] Only skip default ignorables within CCSes
diff --git a/src/hb-ot-shape-complex-use-machine.hh b/src/hb-ot-shape-complex-use-machine.hh index bb046a7..f753aa0 100644 --- a/src/hb-ot-shape-complex-use-machine.hh +++ b/src/hb-ot-shape-complex-use-machine.hh
@@ -56,6 +56,7 @@ #line 58 "hb-ot-shape-complex-use-machine.hh" #define use_syllable_machine_ex_B 1u +#define use_syllable_machine_ex_CGJ 6u #define use_syllable_machine_ex_CMAbv 31u #define use_syllable_machine_ex_CMBlw 32u #define use_syllable_machine_ex_CS 43u @@ -96,7 +97,7 @@ #define use_syllable_machine_ex_ZWNJ 14u -#line 100 "hb-ot-shape-complex-use-machine.hh" +#line 101 "hb-ot-shape-complex-use-machine.hh" static const unsigned char _use_syllable_machine_trans_keys[] = { 1u, 1u, 1u, 1u, 0u, 51u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, @@ -369,7 +370,7 @@ -#line 176 "hb-ot-shape-complex-use-machine.rl" +#line 177 "hb-ot-shape-complex-use-machine.rl" #define found_syllable(syllable_type) \ @@ -422,8 +423,8 @@ static bool -not_standard_default_ignorable (const hb_glyph_info_t &i) -{ return !(i.use_category() == USE(O) && _hb_glyph_info_is_default_ignorable (&i)); } +not_ccs_default_ignorable (const hb_glyph_info_t &i) +{ return !(i.use_category() == USE(CGJ) && _hb_glyph_info_is_default_ignorable (&i)); } static inline void find_syllables_use (hb_buffer_t *buffer) @@ -432,13 +433,13 @@ auto p = + hb_iter (info, buffer->len) | hb_enumerate - | hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); }, + | hb_filter ([] (const hb_glyph_info_t &i) { return not_ccs_default_ignorable (i); }, hb_second) | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p) { if (p.second.use_category() == USE(ZWNJ)) for (unsigned i = p.first + 1; i < buffer->len; ++i) - if (not_standard_default_ignorable (info[i])) + if (not_ccs_default_ignorable (info[i])) return !_hb_glyph_info_is_unicode_mark (&info[i]); return true; }) @@ -452,7 +453,7 @@ unsigned int act HB_UNUSED; int cs; -#line 456 "hb-ot-shape-complex-use-machine.hh" +#line 457 "hb-ot-shape-complex-use-machine.hh" { cs = use_syllable_machine_start; ts = 0; @@ -460,12 +461,12 @@ act = 0; } -#line 260 "hb-ot-shape-complex-use-machine.rl" +#line 261 "hb-ot-shape-complex-use-machine.rl" unsigned int syllable_serial = 1; -#line 469 "hb-ot-shape-complex-use-machine.hh" +#line 470 "hb-ot-shape-complex-use-machine.hh" { int _slen; int _trans; @@ -479,7 +480,7 @@ #line 1 "NONE" {ts = p;} break; -#line 483 "hb-ot-shape-complex-use-machine.hh" +#line 484 "hb-ot-shape-complex-use-machine.hh" } _keys = _use_syllable_machine_trans_keys + (cs<<1); @@ -502,62 +503,62 @@ {te = p+1;} break; case 5: -#line 163 "hb-ot-shape-complex-use-machine.rl" +#line 164 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_independent_cluster); }} break; case 9: -#line 166 "hb-ot-shape-complex-use-machine.rl" +#line 167 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_standard_cluster); }} break; case 7: -#line 171 "hb-ot-shape-complex-use-machine.rl" +#line 172 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_broken_cluster); }} break; case 6: -#line 172 "hb-ot-shape-complex-use-machine.rl" +#line 173 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_non_cluster); }} break; case 10: -#line 164 "hb-ot-shape-complex-use-machine.rl" +#line 165 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_virama_terminated_cluster); }} break; case 11: -#line 165 "hb-ot-shape-complex-use-machine.rl" +#line 166 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }} break; case 8: -#line 166 "hb-ot-shape-complex-use-machine.rl" +#line 167 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_standard_cluster); }} break; case 13: -#line 167 "hb-ot-shape-complex-use-machine.rl" +#line 168 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }} break; case 12: -#line 168 "hb-ot-shape-complex-use-machine.rl" +#line 169 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_numeral_cluster); }} break; case 14: -#line 169 "hb-ot-shape-complex-use-machine.rl" +#line 170 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_symbol_cluster); }} break; case 17: -#line 170 "hb-ot-shape-complex-use-machine.rl" +#line 171 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_hieroglyph_cluster); }} break; case 15: -#line 171 "hb-ot-shape-complex-use-machine.rl" +#line 172 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_broken_cluster); }} break; case 16: -#line 172 "hb-ot-shape-complex-use-machine.rl" +#line 173 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_non_cluster); }} break; case 1: -#line 171 "hb-ot-shape-complex-use-machine.rl" +#line 172 "hb-ot-shape-complex-use-machine.rl" {{p = ((te))-1;}{ found_syllable (use_broken_cluster); }} break; -#line 561 "hb-ot-shape-complex-use-machine.hh" +#line 562 "hb-ot-shape-complex-use-machine.hh" } _again: @@ -566,7 +567,7 @@ #line 1 "NONE" {ts = 0;} break; -#line 570 "hb-ot-shape-complex-use-machine.hh" +#line 571 "hb-ot-shape-complex-use-machine.hh" } if ( ++p != pe ) @@ -582,7 +583,7 @@ } -#line 265 "hb-ot-shape-complex-use-machine.rl" +#line 266 "hb-ot-shape-complex-use-machine.rl" }