diff --git a/src/gen-use-table.py b/src/gen-use-table.py index 4f48261258cb2cd10b26fe110ad60c9538cb55d7..09cc64fa694ba96febb297a99085e8bf32857bb9 100755 --- a/src/gen-use-table.py +++ b/src/gen-use-table.py @@ -178,6 +178,8 @@ def is_CONS_MOD(U, UISC, UGC): def is_CONS_SUB(U, UISC, UGC): #SPEC-DRAFT return UISC == Consonant_Subjoined return UISC == Consonant_Subjoined and UGC != Lo +def is_CONS_WITH_STACKER(U, UISC, UGC): + return UISC == Consonant_With_Stacker def is_HALANT(U, UISC, UGC): return UISC in [Virama, Invisible_Stacker] def is_HALANT_NUM(U, UISC, UGC): @@ -199,9 +201,7 @@ def is_OTHER(U, UISC, UGC): def is_Reserved(U, UISC, UGC): return UGC == 'Cn' def is_REPHA(U, UISC, UGC): - #return UISC == Consonant_Preceding_Repha - #SPEC-OUTDATED hack to categorize Consonant_With_Stacker and Consonant_Prefixed - return UISC in [Consonant_Preceding_Repha, Consonant_With_Stacker, Consonant_Prefixed] + return UISC in [Consonant_Preceding_Repha, Consonant_Prefixed] def is_SYM(U, UISC, UGC): if U == 0x25CC: return False #SPEC-DRAFT #SPEC-DRAFT return UGC in [So, Sc] or UISC == Symbol_Letter @@ -230,6 +230,7 @@ use_mapping = { 'M': is_CONS_MED, 'CM': is_CONS_MOD, 'SUB': is_CONS_SUB, + 'CS': is_CONS_WITH_STACKER, 'H': is_HALANT, 'HN': is_HALANT_NUM, 'ZWNJ': is_ZWNJ, diff --git a/src/hb-ot-shape-complex-use-machine.rl b/src/hb-ot-shape-complex-use-machine.rl index 2a7f75115e166381da5ca091cfa3362270a3c42a..7bd8fce15e447b4d523308b0c3095a437a4e7510 100644 --- a/src/hb-ot-shape-complex-use-machine.rl +++ b/src/hb-ot-shape-complex-use-machine.rl @@ -86,6 +86,7 @@ VMPst = 39; # VOWEL_MOD_POST VMPre = 23; # VOWEL_MOD_PRE SMAbv = 41; # SYM_MOD_ABOVE SMBlw = 42; # SYM_MOD_BELOW +CS = 43; # CONS_WITH_STACKER consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*; @@ -96,12 +97,12 @@ vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*; final_consonants = FAbv* FBlw* FPst* FM?; virama_terminated_cluster = - R? (B | GB) VS? + (R|CS)? (B | GB) VS? consonant_modifiers H ; standard_cluster = - R? (B | GB) VS? + (R|CS)? (B | GB) VS? consonant_modifiers medial_consonants dependent_vowels diff --git a/src/hb-ot-shape-complex-use-private.hh b/src/hb-ot-shape-complex-use-private.hh index ae428cb5eb24c9d9df9aed56290c0c2502d96a98..3e763ae3936c224c5cec1be448aeb3526f4602d4 100644 --- a/src/hb-ot-shape-complex-use-private.hh +++ b/src/hb-ot-shape-complex-use-private.hh @@ -87,7 +87,8 @@ enum use_category_t { USE_VMPst = 39, /* VOWEL_MOD_POST */ USE_VMPre = 23, /* VOWEL_MOD_PRE */ USE_SMAbv = 41, /* SYM_MOD_ABOVE */ - USE_SMBlw = 42 /* SYM_MOD_BELOW */ + USE_SMBlw = 42, /* SYM_MOD_BELOW */ + USE_CS = 43 /* CONS_WITH_STACKER */ }; HB_INTERNAL USE_TABLE_ELEMENT_TYPE diff --git a/src/hb-ot-shape-complex-use-table.cc b/src/hb-ot-shape-complex-use-table.cc index daae04ed3c83ac6de664aff89e8f4721398c82e4..1f90fc858b427d3f1f5f6c573edb90f4bf02da64 100644 --- a/src/hb-ot-shape-complex-use-table.cc +++ b/src/hb-ot-shape-complex-use-table.cc @@ -19,6 +19,7 @@ #define B USE_B /* BASE */ #define CGJ USE_CGJ /* CGJ */ +#define CS USE_CS /* CONS_WITH_STACKER */ #define FM USE_FM /* CONS_FINAL_MOD */ #define GB USE_GB /* BASE_OTHER */ #define H USE_H /* HALANT */ @@ -163,7 +164,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 0CC0 */ VAbv, VPst, VPst, VPst, VPst, O, VAbv, VAbv, VAbv, O, VAbv, VAbv, VAbv, H, O, O, /* 0CD0 */ O, O, O, O, O, VPst, VPst, O, O, O, O, O, O, O, B, O, /* 0CE0 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B, - /* 0CF0 */ O, R, R, O, O, O, O, O, O, O, O, O, O, O, O, O, + /* 0CF0 */ O, CS, CS, O, O, O, O, O, O, O, O, O, O, O, O, O, /* Malayalam */ @@ -467,7 +468,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* Brahmi */ - /* 11000 */ VMPst, VMAbv, VMPst, R, R, B, B, B, B, B, B, B, B, B, B, B, + /* 11000 */ VMPst, VMAbv, VMPst, CS, CS, 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, /* 11030 */ B, B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, @@ -729,6 +730,7 @@ hb_use_get_categories (hb_codepoint_t u) #undef B #undef CGJ +#undef CS #undef FM #undef GB #undef H