From 7287125c586994bf2ea5d3117b15731475ce3192 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Tue, 5 Oct 2021 08:52:11 -0400 Subject: [PATCH] [USE] Merge the categories S and O --- src/gen-use-table.py | 5 - src/hb-ot-shape-complex-use-machine.hh | 470 ++++++++++++------------- src/hb-ot-shape-complex-use-machine.rl | 6 +- src/hb-ot-shape-complex-use-table.hh | 4 +- src/hb-ot-shape-complex-use.cc | 1 - 5 files changed, 234 insertions(+), 252 deletions(-) diff --git a/src/gen-use-table.py b/src/gen-use-table.py index d0bb68a04..7613c710e 100755 --- a/src/gen-use-table.py +++ b/src/gen-use-table.py @@ -289,16 +289,12 @@ def is_OTHER(U, UISC, UDI, UGC, AJT): and not is_BASE(U, UISC, UDI, UGC, AJT) and not is_BASE_OTHER(U, UISC, UDI, UGC, AJT) and not is_CGJ(U, UISC, UDI, UGC, AJT) - and not is_SYM(U, UISC, UDI, UGC, AJT) and not is_SYM_MOD(U, UISC, UDI, UGC, AJT) ) def is_REPHA(U, UISC, UDI, UGC, AJT): return UISC in [Consonant_Preceding_Repha, Consonant_Prefixed] def is_SAKOT(U, UISC, UDI, UGC, AJT): return U == 0x1A60 -def is_SYM(U, UISC, UDI, UGC, AJT): - if U in [0x25CC, 0x1E14F]: return False - return UGC in [So, Sc] and U not in [0x0F01, 0x1B62, 0x1B68] def is_SYM_MOD(U, UISC, UDI, UGC, AJT): return U in [0x1B6B, 0x1B6C, 0x1B6D, 0x1B6E, 0x1B6F, 0x1B70, 0x1B71, 0x1B72, 0x1B73] def is_VOWEL(U, UISC, UDI, UGC, AJT): @@ -331,7 +327,6 @@ use_mapping = { 'ZWNJ': is_ZWNJ, 'O': is_OTHER, 'R': is_REPHA, - 'S': is_SYM, 'Sk': is_SAKOT, 'SM': is_SYM_MOD, 'V': is_VOWEL, diff --git a/src/hb-ot-shape-complex-use-machine.hh b/src/hb-ot-shape-complex-use-machine.hh index f753aa038..5425d8414 100644 --- a/src/hb-ot-shape-complex-use-machine.hh +++ b/src/hb-ot-shape-complex-use-machine.hh @@ -41,7 +41,6 @@ #define USE(Cat) use_syllable_machine_ex_##Cat enum use_syllable_type_t { - use_independent_cluster, use_virama_terminated_cluster, use_sakot_terminated_cluster, use_standard_cluster, @@ -54,7 +53,7 @@ enum use_syllable_type_t { }; -#line 58 "hb-ot-shape-complex-use-machine.hh" +#line 57 "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 @@ -79,7 +78,6 @@ enum use_syllable_type_t { #define use_syllable_machine_ex_N 4u #define use_syllable_machine_ex_O 0u #define use_syllable_machine_ex_R 18u -#define use_syllable_machine_ex_S 19u #define use_syllable_machine_ex_SB 51u #define use_syllable_machine_ex_SE 52u #define use_syllable_machine_ex_SMAbv 41u @@ -97,12 +95,12 @@ enum use_syllable_type_t { #define use_syllable_machine_ex_ZWNJ 14u -#line 101 "hb-ot-shape-complex-use-machine.hh" +#line 99 "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, - 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, - 11u, 48u, 1u, 48u, 13u, 13u, 4u, 4u, 11u, 48u, 41u, 42u, 42u, 42u, 11u, 48u, + 1u, 1u, 1u, 1u, 0u, 51u, 41u, 42u, 42u, 42u, 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, 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, + 22u, 48u, 22u, 48u, 11u, 48u, 1u, 48u, 13u, 13u, 4u, 4u, 11u, 48u, 11u, 48u, 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 11u, 48u, 1u, 48u, 1u, 1u, 4u, 4u, 13u, 13u, 1u, 48u, 11u, 48u, @@ -110,10 +108,10 @@ static const unsigned char _use_syllable_machine_trans_keys[] = { }; static const char _use_syllable_machine_key_spans[] = { - 1, 1, 52, 38, 38, 1, 27, 26, - 24, 23, 22, 2, 1, 25, 25, 25, - 1, 25, 26, 26, 26, 27, 27, 27, - 38, 48, 1, 1, 38, 2, 1, 38, + 1, 1, 52, 2, 1, 38, 38, 1, + 27, 26, 24, 23, 22, 2, 1, 25, + 25, 25, 1, 25, 26, 26, 26, 27, + 27, 27, 38, 48, 1, 1, 38, 38, 27, 26, 24, 23, 22, 2, 1, 25, 25, 25, 25, 26, 26, 26, 27, 27, 27, 38, 48, 1, 1, 1, 48, 38, @@ -121,10 +119,10 @@ static const char _use_syllable_machine_key_spans[] = { }; static const short _use_syllable_machine_index_offsets[] = { - 0, 2, 4, 57, 96, 135, 137, 165, - 192, 217, 241, 264, 267, 269, 295, 321, - 347, 349, 375, 402, 429, 456, 484, 512, - 540, 579, 628, 630, 632, 671, 674, 676, + 0, 2, 4, 57, 60, 62, 101, 140, + 142, 170, 197, 222, 246, 269, 272, 274, + 300, 326, 352, 354, 380, 407, 434, 461, + 489, 517, 545, 584, 633, 635, 637, 676, 715, 743, 770, 795, 819, 842, 845, 847, 873, 899, 925, 951, 978, 1005, 1032, 1060, 1088, 1116, 1155, 1204, 1206, 1208, 1210, 1259, @@ -134,196 +132,196 @@ static const short _use_syllable_machine_index_offsets[] = { static const char _use_syllable_machine_indicies[] = { 1, 0, 2, 0, 3, 4, 5, 5, 6, 7, 5, 5, 5, 5, 5, 1, - 8, 9, 5, 5, 5, 5, 10, 11, - 5, 5, 12, 13, 14, 15, 16, 17, - 18, 12, 19, 20, 21, 22, 23, 24, - 5, 25, 26, 27, 5, 28, 29, 30, - 31, 32, 33, 34, 8, 35, 5, 36, - 5, 38, 39, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 40, 41, 42, 43, - 44, 45, 46, 40, 47, 4, 48, 49, - 50, 51, 37, 52, 53, 54, 37, 37, - 37, 37, 55, 56, 57, 58, 39, 37, - 38, 39, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 40, 41, 42, 43, 44, - 45, 46, 40, 47, 48, 48, 49, 50, - 51, 37, 52, 53, 54, 37, 37, 37, - 37, 55, 56, 57, 58, 39, 37, 38, - 59, 40, 41, 42, 43, 44, 37, 37, - 37, 37, 37, 37, 49, 50, 51, 37, - 52, 53, 54, 37, 37, 37, 37, 41, - 56, 57, 58, 60, 37, 41, 42, 43, - 44, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 52, 53, 54, 37, 37, - 37, 37, 37, 56, 57, 58, 60, 37, - 42, 43, 44, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 56, 57, 58, - 37, 43, 44, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 56, 57, 58, - 37, 44, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 56, 57, 58, 37, - 56, 57, 37, 57, 37, 42, 43, 44, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 52, 53, 54, 37, 37, 37, - 37, 37, 56, 57, 58, 60, 37, 42, - 43, 44, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 53, 54, 37, - 37, 37, 37, 37, 56, 57, 58, 60, - 37, 42, 43, 44, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, - 54, 37, 37, 37, 37, 37, 56, 57, - 58, 60, 37, 62, 61, 42, 43, 44, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 56, 57, 58, 60, 37, 41, - 42, 43, 44, 37, 37, 37, 37, 37, - 37, 49, 50, 51, 37, 52, 53, 54, - 37, 37, 37, 37, 41, 56, 57, 58, - 60, 37, 41, 42, 43, 44, 37, 37, - 37, 37, 37, 37, 37, 50, 51, 37, - 52, 53, 54, 37, 37, 37, 37, 41, - 56, 57, 58, 60, 37, 41, 42, 43, - 44, 37, 37, 37, 37, 37, 37, 37, - 37, 51, 37, 52, 53, 54, 37, 37, - 37, 37, 41, 56, 57, 58, 60, 37, - 40, 41, 42, 43, 44, 37, 46, 40, - 37, 37, 37, 49, 50, 51, 37, 52, - 53, 54, 37, 37, 37, 37, 41, 56, - 57, 58, 60, 37, 40, 41, 42, 43, - 44, 37, 37, 40, 37, 37, 37, 49, - 50, 51, 37, 52, 53, 54, 37, 37, - 37, 37, 41, 56, 57, 58, 60, 37, - 40, 41, 42, 43, 44, 45, 46, 40, - 37, 37, 37, 49, 50, 51, 37, 52, - 53, 54, 37, 37, 37, 37, 41, 56, - 57, 58, 60, 37, 38, 39, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 40, - 41, 42, 43, 44, 45, 46, 40, 47, - 37, 48, 49, 50, 51, 37, 52, 53, - 54, 37, 37, 37, 37, 55, 56, 57, - 58, 39, 37, 38, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, - 59, 41, 42, 43, 44, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 52, - 53, 54, 59, 59, 59, 59, 59, 56, - 57, 58, 60, 59, 64, 63, 6, 65, - 38, 39, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 40, 41, 42, 43, 44, - 45, 46, 40, 47, 4, 48, 49, 50, - 51, 37, 52, 53, 54, 37, 11, 66, - 37, 55, 56, 57, 58, 39, 37, 11, - 66, 67, 66, 67, 1, 69, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 12, - 13, 14, 15, 16, 17, 18, 12, 19, - 21, 21, 22, 23, 24, 68, 25, 26, - 27, 68, 68, 68, 68, 31, 32, 33, - 34, 69, 68, 12, 13, 14, 15, 16, - 68, 68, 68, 68, 68, 68, 22, 23, - 24, 68, 25, 26, 27, 68, 68, 68, - 68, 13, 32, 33, 34, 70, 68, 13, - 14, 15, 16, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 25, 26, 27, - 68, 68, 68, 68, 68, 32, 33, 34, - 70, 68, 14, 15, 16, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 32, - 33, 34, 68, 15, 16, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 32, - 33, 34, 68, 16, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 32, 33, - 34, 68, 32, 33, 68, 33, 68, 14, - 15, 16, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 25, 26, 27, 68, - 68, 68, 68, 68, 32, 33, 34, 70, - 68, 14, 15, 16, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 26, - 27, 68, 68, 68, 68, 68, 32, 33, - 34, 70, 68, 14, 15, 16, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 27, 68, 68, 68, 68, 68, - 32, 33, 34, 70, 68, 14, 15, 16, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 32, 33, 34, 70, 68, 13, - 14, 15, 16, 68, 68, 68, 68, 68, - 68, 22, 23, 24, 68, 25, 26, 27, - 68, 68, 68, 68, 13, 32, 33, 34, - 70, 68, 13, 14, 15, 16, 68, 68, - 68, 68, 68, 68, 68, 23, 24, 68, - 25, 26, 27, 68, 68, 68, 68, 13, - 32, 33, 34, 70, 68, 13, 14, 15, - 16, 68, 68, 68, 68, 68, 68, 68, - 68, 24, 68, 25, 26, 27, 68, 68, - 68, 68, 13, 32, 33, 34, 70, 68, - 12, 13, 14, 15, 16, 68, 18, 12, - 68, 68, 68, 22, 23, 24, 68, 25, - 26, 27, 68, 68, 68, 68, 13, 32, - 33, 34, 70, 68, 12, 13, 14, 15, - 16, 68, 68, 12, 68, 68, 68, 22, - 23, 24, 68, 25, 26, 27, 68, 68, - 68, 68, 13, 32, 33, 34, 70, 68, - 12, 13, 14, 15, 16, 17, 18, 12, - 68, 68, 68, 22, 23, 24, 68, 25, - 26, 27, 68, 68, 68, 68, 13, 32, - 33, 34, 70, 68, 1, 69, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 12, - 13, 14, 15, 16, 17, 18, 12, 19, - 68, 21, 22, 23, 24, 68, 25, 26, - 27, 68, 68, 68, 68, 31, 32, 33, - 34, 69, 68, 1, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 13, 14, 15, 16, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 25, - 26, 27, 68, 68, 68, 68, 68, 32, - 33, 34, 70, 68, 1, 71, 72, 68, - 9, 68, 4, 68, 68, 68, 4, 68, - 68, 68, 68, 68, 1, 69, 9, 68, - 68, 68, 68, 68, 68, 68, 68, 12, - 13, 14, 15, 16, 17, 18, 12, 19, - 20, 21, 22, 23, 24, 68, 25, 26, - 27, 68, 28, 29, 68, 31, 32, 33, - 34, 69, 68, 1, 69, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 12, 13, - 14, 15, 16, 17, 18, 12, 19, 20, - 21, 22, 23, 24, 68, 25, 26, 27, - 68, 68, 68, 68, 31, 32, 33, 34, - 69, 68, 28, 29, 68, 29, 68, 4, - 71, 71, 71, 4, 71, 74, 73, 35, - 73, 35, 74, 73, 74, 73, 35, 73, - 36, 73, 0 + 8, 9, 5, 5, 5, 5, 10, 5, + 5, 5, 11, 12, 13, 14, 15, 16, + 17, 11, 18, 19, 20, 21, 22, 23, + 5, 24, 25, 26, 5, 27, 28, 29, + 30, 31, 32, 33, 8, 34, 5, 35, + 5, 3, 37, 36, 37, 36, 39, 40, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 41, 42, 43, 44, 45, 46, 47, + 41, 48, 4, 49, 50, 51, 52, 38, + 53, 54, 55, 38, 38, 38, 38, 56, + 57, 58, 59, 40, 38, 39, 40, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 41, 42, 43, 44, 45, 46, 47, 41, + 48, 49, 49, 50, 51, 52, 38, 53, + 54, 55, 38, 38, 38, 38, 56, 57, + 58, 59, 40, 38, 39, 60, 41, 42, + 43, 44, 45, 38, 38, 38, 38, 38, + 38, 50, 51, 52, 38, 53, 54, 55, + 38, 38, 38, 38, 42, 57, 58, 59, + 61, 38, 42, 43, 44, 45, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 53, 54, 55, 38, 38, 38, 38, 38, + 57, 58, 59, 61, 38, 43, 44, 45, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 57, 58, 59, 38, 44, 45, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 57, 58, 59, 38, 45, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 57, 58, 59, 38, 57, 58, 38, + 58, 38, 43, 44, 45, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 53, + 54, 55, 38, 38, 38, 38, 38, 57, + 58, 59, 61, 38, 43, 44, 45, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 54, 55, 38, 38, 38, 38, + 38, 57, 58, 59, 61, 38, 43, 44, + 45, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 55, 38, 38, + 38, 38, 38, 57, 58, 59, 61, 38, + 63, 62, 43, 44, 45, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 57, + 58, 59, 61, 38, 42, 43, 44, 45, + 38, 38, 38, 38, 38, 38, 50, 51, + 52, 38, 53, 54, 55, 38, 38, 38, + 38, 42, 57, 58, 59, 61, 38, 42, + 43, 44, 45, 38, 38, 38, 38, 38, + 38, 38, 51, 52, 38, 53, 54, 55, + 38, 38, 38, 38, 42, 57, 58, 59, + 61, 38, 42, 43, 44, 45, 38, 38, + 38, 38, 38, 38, 38, 38, 52, 38, + 53, 54, 55, 38, 38, 38, 38, 42, + 57, 58, 59, 61, 38, 41, 42, 43, + 44, 45, 38, 47, 41, 38, 38, 38, + 50, 51, 52, 38, 53, 54, 55, 38, + 38, 38, 38, 42, 57, 58, 59, 61, + 38, 41, 42, 43, 44, 45, 38, 38, + 41, 38, 38, 38, 50, 51, 52, 38, + 53, 54, 55, 38, 38, 38, 38, 42, + 57, 58, 59, 61, 38, 41, 42, 43, + 44, 45, 46, 47, 41, 38, 38, 38, + 50, 51, 52, 38, 53, 54, 55, 38, + 38, 38, 38, 42, 57, 58, 59, 61, + 38, 39, 40, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 41, 42, 43, 44, + 45, 46, 47, 41, 48, 38, 49, 50, + 51, 52, 38, 53, 54, 55, 38, 38, + 38, 38, 56, 57, 58, 59, 40, 38, + 39, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 42, 43, + 44, 45, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 53, 54, 55, 60, + 60, 60, 60, 60, 57, 58, 59, 61, + 60, 65, 64, 6, 66, 39, 40, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 41, 42, 43, 44, 45, 46, 47, 41, + 48, 4, 49, 50, 51, 52, 38, 53, + 54, 55, 38, 3, 37, 38, 56, 57, + 58, 59, 40, 38, 1, 68, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 11, + 12, 13, 14, 15, 16, 17, 11, 18, + 20, 20, 21, 22, 23, 67, 24, 25, + 26, 67, 67, 67, 67, 30, 31, 32, + 33, 68, 67, 11, 12, 13, 14, 15, + 67, 67, 67, 67, 67, 67, 21, 22, + 23, 67, 24, 25, 26, 67, 67, 67, + 67, 12, 31, 32, 33, 69, 67, 12, + 13, 14, 15, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 24, 25, 26, + 67, 67, 67, 67, 67, 31, 32, 33, + 69, 67, 13, 14, 15, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 31, + 32, 33, 67, 14, 15, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 31, + 32, 33, 67, 15, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 31, 32, + 33, 67, 31, 32, 67, 32, 67, 13, + 14, 15, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 24, 25, 26, 67, + 67, 67, 67, 67, 31, 32, 33, 69, + 67, 13, 14, 15, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 25, + 26, 67, 67, 67, 67, 67, 31, 32, + 33, 69, 67, 13, 14, 15, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 26, 67, 67, 67, 67, 67, + 31, 32, 33, 69, 67, 13, 14, 15, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 31, 32, 33, 69, 67, 12, + 13, 14, 15, 67, 67, 67, 67, 67, + 67, 21, 22, 23, 67, 24, 25, 26, + 67, 67, 67, 67, 12, 31, 32, 33, + 69, 67, 12, 13, 14, 15, 67, 67, + 67, 67, 67, 67, 67, 22, 23, 67, + 24, 25, 26, 67, 67, 67, 67, 12, + 31, 32, 33, 69, 67, 12, 13, 14, + 15, 67, 67, 67, 67, 67, 67, 67, + 67, 23, 67, 24, 25, 26, 67, 67, + 67, 67, 12, 31, 32, 33, 69, 67, + 11, 12, 13, 14, 15, 67, 17, 11, + 67, 67, 67, 21, 22, 23, 67, 24, + 25, 26, 67, 67, 67, 67, 12, 31, + 32, 33, 69, 67, 11, 12, 13, 14, + 15, 67, 67, 11, 67, 67, 67, 21, + 22, 23, 67, 24, 25, 26, 67, 67, + 67, 67, 12, 31, 32, 33, 69, 67, + 11, 12, 13, 14, 15, 16, 17, 11, + 67, 67, 67, 21, 22, 23, 67, 24, + 25, 26, 67, 67, 67, 67, 12, 31, + 32, 33, 69, 67, 1, 68, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 11, + 12, 13, 14, 15, 16, 17, 11, 18, + 67, 20, 21, 22, 23, 67, 24, 25, + 26, 67, 67, 67, 67, 30, 31, 32, + 33, 68, 67, 1, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, + 67, 12, 13, 14, 15, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 24, + 25, 26, 67, 67, 67, 67, 67, 31, + 32, 33, 69, 67, 1, 70, 71, 67, + 9, 67, 4, 67, 67, 67, 4, 67, + 67, 67, 67, 67, 1, 68, 9, 67, + 67, 67, 67, 67, 67, 67, 67, 11, + 12, 13, 14, 15, 16, 17, 11, 18, + 19, 20, 21, 22, 23, 67, 24, 25, + 26, 67, 27, 28, 67, 30, 31, 32, + 33, 68, 67, 1, 68, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 11, 12, + 13, 14, 15, 16, 17, 11, 18, 19, + 20, 21, 22, 23, 67, 24, 25, 26, + 67, 67, 67, 67, 30, 31, 32, 33, + 68, 67, 27, 28, 67, 28, 67, 4, + 70, 70, 70, 4, 70, 73, 72, 34, + 72, 34, 73, 72, 73, 72, 34, 72, + 35, 72, 0 }; static const char _use_syllable_machine_trans_targs[] = { - 2, 31, 42, 2, 3, 2, 26, 28, - 51, 52, 54, 29, 32, 33, 34, 35, - 36, 46, 47, 48, 55, 49, 43, 44, - 45, 39, 40, 41, 56, 57, 58, 50, - 37, 38, 2, 59, 61, 2, 4, 5, - 6, 7, 8, 9, 10, 21, 22, 23, - 24, 18, 19, 20, 13, 14, 15, 25, - 11, 12, 2, 2, 16, 2, 17, 2, - 27, 2, 30, 2, 2, 0, 1, 2, - 53, 2, 60 + 2, 31, 42, 3, 5, 2, 28, 30, + 51, 52, 54, 32, 33, 34, 35, 36, + 46, 47, 48, 55, 49, 43, 44, 45, + 39, 40, 41, 56, 57, 58, 50, 37, + 38, 2, 59, 61, 2, 4, 2, 6, + 7, 8, 9, 10, 11, 12, 23, 24, + 25, 26, 20, 21, 22, 15, 16, 17, + 27, 13, 14, 2, 2, 18, 2, 19, + 2, 29, 2, 2, 0, 1, 2, 53, + 2, 60 }; static const char _use_syllable_machine_trans_actions[] = { - 1, 2, 2, 5, 0, 6, 0, 0, - 0, 0, 2, 0, 2, 2, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 0, 0, 2, - 0, 0, 7, 0, 0, 8, 0, 0, + 1, 2, 2, 0, 0, 5, 0, 0, + 0, 0, 2, 2, 2, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 0, 0, 0, 2, 0, + 0, 6, 0, 0, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 10, 0, 11, 0, 12, - 0, 13, 0, 14, 15, 0, 0, 16, - 0, 17, 0 + 0, 0, 0, 9, 10, 0, 11, 0, + 12, 0, 13, 14, 0, 0, 15, 0, + 16, 0 }; static const char _use_syllable_machine_to_state_actions[] = { @@ -349,14 +347,14 @@ static const char _use_syllable_machine_from_state_actions[] = { }; static const short _use_syllable_machine_eof_trans[] = { - 1, 1, 0, 38, 38, 60, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, - 62, 38, 38, 38, 38, 38, 38, 38, - 38, 60, 64, 66, 38, 68, 68, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 72, 69, 69, 69, 69, - 69, 69, 72, 74, 74, 74 + 1, 1, 0, 37, 37, 39, 39, 61, + 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 63, 39, 39, 39, 39, 39, + 39, 39, 39, 61, 65, 67, 39, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 71, 68, 68, 68, 68, + 68, 68, 71, 73, 73, 73 }; static const int use_syllable_machine_start = 2; @@ -366,11 +364,11 @@ static const int use_syllable_machine_error = -1; static const int use_syllable_machine_en_main = 2; -#line 59 "hb-ot-shape-complex-use-machine.rl" +#line 58 "hb-ot-shape-complex-use-machine.rl" -#line 177 "hb-ot-shape-complex-use-machine.rl" +#line 173 "hb-ot-shape-complex-use-machine.rl" #define found_syllable(syllable_type) \ @@ -453,7 +451,7 @@ find_syllables_use (hb_buffer_t *buffer) unsigned int act HB_UNUSED; int cs; -#line 457 "hb-ot-shape-complex-use-machine.hh" +#line 455 "hb-ot-shape-complex-use-machine.hh" { cs = use_syllable_machine_start; ts = 0; @@ -461,12 +459,12 @@ find_syllables_use (hb_buffer_t *buffer) act = 0; } -#line 261 "hb-ot-shape-complex-use-machine.rl" +#line 257 "hb-ot-shape-complex-use-machine.rl" unsigned int syllable_serial = 1; -#line 470 "hb-ot-shape-complex-use-machine.hh" +#line 468 "hb-ot-shape-complex-use-machine.hh" { int _slen; int _trans; @@ -480,7 +478,7 @@ _resume: #line 1 "NONE" {ts = p;} break; -#line 484 "hb-ot-shape-complex-use-machine.hh" +#line 482 "hb-ot-shape-complex-use-machine.hh" } _keys = _use_syllable_machine_trans_keys + (cs<<1); @@ -502,63 +500,59 @@ _eof_trans: #line 1 "NONE" {te = p+1;} break; - case 5: -#line 164 "hb-ot-shape-complex-use-machine.rl" - {te = p+1;{ found_syllable (use_independent_cluster); }} - break; case 9: -#line 167 "hb-ot-shape-complex-use-machine.rl" +#line 163 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_standard_cluster); }} break; - case 7: -#line 172 "hb-ot-shape-complex-use-machine.rl" + case 6: +#line 168 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_broken_cluster); }} break; - case 6: -#line 173 "hb-ot-shape-complex-use-machine.rl" + case 5: +#line 169 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (use_non_cluster); }} break; case 10: -#line 165 "hb-ot-shape-complex-use-machine.rl" +#line 161 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_virama_terminated_cluster); }} break; case 11: -#line 166 "hb-ot-shape-complex-use-machine.rl" +#line 162 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }} break; case 8: -#line 167 "hb-ot-shape-complex-use-machine.rl" +#line 163 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_standard_cluster); }} break; case 13: -#line 168 "hb-ot-shape-complex-use-machine.rl" +#line 164 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }} break; case 12: -#line 169 "hb-ot-shape-complex-use-machine.rl" +#line 165 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_numeral_cluster); }} break; - case 14: -#line 170 "hb-ot-shape-complex-use-machine.rl" + case 7: +#line 166 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_symbol_cluster); }} break; - case 17: -#line 171 "hb-ot-shape-complex-use-machine.rl" + case 16: +#line 167 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_hieroglyph_cluster); }} break; - case 15: -#line 172 "hb-ot-shape-complex-use-machine.rl" + case 14: +#line 168 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_broken_cluster); }} break; - case 16: -#line 173 "hb-ot-shape-complex-use-machine.rl" + case 15: +#line 169 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (use_non_cluster); }} break; case 1: -#line 172 "hb-ot-shape-complex-use-machine.rl" +#line 168 "hb-ot-shape-complex-use-machine.rl" {{p = ((te))-1;}{ found_syllable (use_broken_cluster); }} break; -#line 562 "hb-ot-shape-complex-use-machine.hh" +#line 556 "hb-ot-shape-complex-use-machine.hh" } _again: @@ -567,7 +561,7 @@ _again: #line 1 "NONE" {ts = 0;} break; -#line 571 "hb-ot-shape-complex-use-machine.hh" +#line 565 "hb-ot-shape-complex-use-machine.hh" } if ( ++p != pe ) @@ -583,7 +577,7 @@ _again: } -#line 266 "hb-ot-shape-complex-use-machine.rl" +#line 262 "hb-ot-shape-complex-use-machine.rl" } diff --git a/src/hb-ot-shape-complex-use-machine.rl b/src/hb-ot-shape-complex-use-machine.rl index ea7531f7d..8e7e5d323 100644 --- a/src/hb-ot-shape-complex-use-machine.rl +++ b/src/hb-ot-shape-complex-use-machine.rl @@ -39,7 +39,6 @@ #define USE(Cat) use_syllable_machine_ex_##Cat enum use_syllable_type_t { - use_independent_cluster, use_virama_terminated_cluster, use_sakot_terminated_cluster, use_standard_cluster, @@ -75,7 +74,6 @@ export H = 12; # HALANT export HN = 13; # HALANT_NUM export ZWNJ = 14; # Zero width non-joiner export R = 18; # REPHA -export S = 19; # SYM export CS = 43; # CONS_WITH_STACKER export HVM = 44; # HALANT_OR_VOWEL_MODIFIER export Sk = 48; # SAKOT @@ -155,13 +153,11 @@ broken_cluster = number_joiner_terminated_cluster = N number_joiner_terminated_cluster_tail; numeral_cluster = N numeral_cluster_tail?; -symbol_cluster = (S | GB) symbol_cluster_tail?; +symbol_cluster = (O | GB) symbol_cluster_tail?; hieroglyph_cluster = SB+ | SB* G SE* (J SE* (G SE*)?)*; -independent_cluster = O; other = any; main := |* - independent_cluster => { found_syllable (use_independent_cluster); }; virama_terminated_cluster => { found_syllable (use_virama_terminated_cluster); }; sakot_terminated_cluster => { found_syllable (use_sakot_terminated_cluster); }; standard_cluster => { found_syllable (use_standard_cluster); }; diff --git a/src/hb-ot-shape-complex-use-table.hh b/src/hb-ot-shape-complex-use-table.hh index dd00bc806..9396f8f88 100644 --- a/src/hb-ot-shape-complex-use-table.hh +++ b/src/hb-ot-shape-complex-use-table.hh @@ -56,7 +56,6 @@ #define N USE(N) /* BASE_NUM */ #define O USE(O) /* OTHER */ #define R USE(R) /* REPHA */ -#define S USE(S) /* SYM */ #define SB USE(SB) /* HIEROGLYPH_SEGMENT_BEGIN */ #define SE USE(SE) /* HIEROGLYPH_SEGMENT_END */ #define SUB USE(SUB) /* CONS_SUB */ @@ -387,7 +386,7 @@ static const uint8_t use_table[] = { /* 1B30 */ B, B, B, B, CMAbv, VPst, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VPre, VPre, /* 1B40 */ VPre, VPre, VAbv, VAbv, H, B, B, B, B, B, B, B, B, O, O, O, /* 1B50 */ B, B, B, B, B, B, B, B, B, B, O, GB, GB, O, O, GB, - /* 1B60 */ O, S, GB, S, S, S, S, S, GB, S, S, SMAbv, SMBlw, SMAbv, SMAbv, SMAbv, + /* 1B60 */ O, O, GB, O, O, O, O, O, GB, O, O, SMAbv, SMBlw, SMAbv, SMAbv, SMAbv, /* 1B70 */ SMAbv, SMAbv, SMAbv, SMAbv, O, O, O, O, O, O, O, O, O, O, O, O, /* Sundanese */ @@ -1249,7 +1248,6 @@ hb_use_get_category (hb_codepoint_t u) #undef N #undef O #undef R -#undef S #undef SB #undef SE #undef SUB diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc index 1e4804c4a..70b637933 100644 --- a/src/hb-ot-shape-complex-use.cc +++ b/src/hb-ot-shape-complex-use.cc @@ -257,7 +257,6 @@ setup_topographical_masks (const hb_ot_shape_plan_t *plan, use_syllable_type_t syllable_type = (use_syllable_type_t) (info[start].syllable() & 0x0F); switch (syllable_type) { - case use_independent_cluster: case use_symbol_cluster: case use_hieroglyph_cluster: case use_non_cluster: