[use] Implement Consonant_With_Stacker
Related to https://github.com/behdad/harfbuzz/issues/528
This commit is contained in:
parent
3ca9c92aa6
commit
e07669fc43
|
@ -178,6 +178,8 @@ def is_CONS_MOD(U, UISC, UGC):
|
||||||
def is_CONS_SUB(U, UISC, UGC):
|
def is_CONS_SUB(U, UISC, UGC):
|
||||||
#SPEC-DRAFT return UISC == Consonant_Subjoined
|
#SPEC-DRAFT return UISC == Consonant_Subjoined
|
||||||
return UISC == Consonant_Subjoined and UGC != Lo
|
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):
|
def is_HALANT(U, UISC, UGC):
|
||||||
return UISC in [Virama, Invisible_Stacker]
|
return UISC in [Virama, Invisible_Stacker]
|
||||||
def is_HALANT_NUM(U, UISC, UGC):
|
def is_HALANT_NUM(U, UISC, UGC):
|
||||||
|
@ -199,9 +201,7 @@ def is_OTHER(U, UISC, UGC):
|
||||||
def is_Reserved(U, UISC, UGC):
|
def is_Reserved(U, UISC, UGC):
|
||||||
return UGC == 'Cn'
|
return UGC == 'Cn'
|
||||||
def is_REPHA(U, UISC, UGC):
|
def is_REPHA(U, UISC, UGC):
|
||||||
#return UISC == Consonant_Preceding_Repha
|
return UISC in [Consonant_Preceding_Repha, Consonant_Prefixed]
|
||||||
#SPEC-OUTDATED hack to categorize Consonant_With_Stacker and Consonant_Prefixed
|
|
||||||
return UISC in [Consonant_Preceding_Repha, Consonant_With_Stacker, Consonant_Prefixed]
|
|
||||||
def is_SYM(U, UISC, UGC):
|
def is_SYM(U, UISC, UGC):
|
||||||
if U == 0x25CC: return False #SPEC-DRAFT
|
if U == 0x25CC: return False #SPEC-DRAFT
|
||||||
#SPEC-DRAFT return UGC in [So, Sc] or UISC == Symbol_Letter
|
#SPEC-DRAFT return UGC in [So, Sc] or UISC == Symbol_Letter
|
||||||
|
@ -230,6 +230,7 @@ use_mapping = {
|
||||||
'M': is_CONS_MED,
|
'M': is_CONS_MED,
|
||||||
'CM': is_CONS_MOD,
|
'CM': is_CONS_MOD,
|
||||||
'SUB': is_CONS_SUB,
|
'SUB': is_CONS_SUB,
|
||||||
|
'CS': is_CONS_WITH_STACKER,
|
||||||
'H': is_HALANT,
|
'H': is_HALANT,
|
||||||
'HN': is_HALANT_NUM,
|
'HN': is_HALANT_NUM,
|
||||||
'ZWNJ': is_ZWNJ,
|
'ZWNJ': is_ZWNJ,
|
||||||
|
|
|
@ -86,6 +86,7 @@ VMPst = 39; # VOWEL_MOD_POST
|
||||||
VMPre = 23; # VOWEL_MOD_PRE
|
VMPre = 23; # VOWEL_MOD_PRE
|
||||||
SMAbv = 41; # SYM_MOD_ABOVE
|
SMAbv = 41; # SYM_MOD_ABOVE
|
||||||
SMBlw = 42; # SYM_MOD_BELOW
|
SMBlw = 42; # SYM_MOD_BELOW
|
||||||
|
CS = 43; # CONS_WITH_STACKER
|
||||||
|
|
||||||
|
|
||||||
consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*;
|
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?;
|
final_consonants = FAbv* FBlw* FPst* FM?;
|
||||||
|
|
||||||
virama_terminated_cluster =
|
virama_terminated_cluster =
|
||||||
R? (B | GB) VS?
|
(R|CS)? (B | GB) VS?
|
||||||
consonant_modifiers
|
consonant_modifiers
|
||||||
H
|
H
|
||||||
;
|
;
|
||||||
standard_cluster =
|
standard_cluster =
|
||||||
R? (B | GB) VS?
|
(R|CS)? (B | GB) VS?
|
||||||
consonant_modifiers
|
consonant_modifiers
|
||||||
medial_consonants
|
medial_consonants
|
||||||
dependent_vowels
|
dependent_vowels
|
||||||
|
|
|
@ -87,7 +87,8 @@ enum use_category_t {
|
||||||
USE_VMPst = 39, /* VOWEL_MOD_POST */
|
USE_VMPst = 39, /* VOWEL_MOD_POST */
|
||||||
USE_VMPre = 23, /* VOWEL_MOD_PRE */
|
USE_VMPre = 23, /* VOWEL_MOD_PRE */
|
||||||
USE_SMAbv = 41, /* SYM_MOD_ABOVE */
|
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
|
HB_INTERNAL USE_TABLE_ELEMENT_TYPE
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#define B USE_B /* BASE */
|
#define B USE_B /* BASE */
|
||||||
#define CGJ USE_CGJ /* CGJ */
|
#define CGJ USE_CGJ /* CGJ */
|
||||||
|
#define CS USE_CS /* CONS_WITH_STACKER */
|
||||||
#define FM USE_FM /* CONS_FINAL_MOD */
|
#define FM USE_FM /* CONS_FINAL_MOD */
|
||||||
#define GB USE_GB /* BASE_OTHER */
|
#define GB USE_GB /* BASE_OTHER */
|
||||||
#define H USE_H /* HALANT */
|
#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,
|
/* 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,
|
/* 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,
|
/* 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 */
|
/* Malayalam */
|
||||||
|
|
||||||
|
@ -467,7 +468,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
|
||||||
|
|
||||||
/* Brahmi */
|
/* 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,
|
/* 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,
|
/* 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,
|
/* 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 B
|
||||||
#undef CGJ
|
#undef CGJ
|
||||||
|
#undef CS
|
||||||
#undef FM
|
#undef FM
|
||||||
#undef GB
|
#undef GB
|
||||||
#undef H
|
#undef H
|
||||||
|
|
Loading…
Reference in New Issue