summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py')
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
index fcb66a58022..09cc64fa694 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
@@ -117,6 +117,7 @@ property_names = [
'Top_And_Right',
'Top_And_Left',
'Top_And_Left_And_Right',
+ 'Bottom_And_Left',
'Bottom_And_Right',
'Top_And_Bottom_And_Right',
'Overstruck',
@@ -153,7 +154,7 @@ def is_BASE(U, UISC, UGC):
def is_BASE_IND(U, UISC, UGC):
#SPEC-DRAFT return (UISC in [Consonant_Dead, Modifying_Letter] or UGC == Po)
return (UISC in [Consonant_Dead, Modifying_Letter] or
- (UGC == Po and not U in [0x104E, 0x2022]) or
+ (UGC == Po and not U in [0x104E, 0x2022, 0x11A3F, 0x11A45]) or
False # SPEC-DRAFT-OUTDATED! U == 0x002D
)
def is_BASE_NUM(U, UISC, UGC):
@@ -177,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):
@@ -198,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
@@ -229,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,
@@ -252,7 +254,7 @@ use_positions = {
},
'M': {
'Abv': [Top],
- 'Blw': [Bottom],
+ 'Blw': [Bottom, Bottom_And_Left],
'Pst': [Right],
'Pre': [Left],
},
@@ -298,8 +300,10 @@ def map_to_use(data):
# the nasalization marks, maybe only for U+1CE9..U+1CF1.
if U == 0x1CED: UISC = Tone_Mark
- evals = [(k, v(U,UISC,UGC)) for k,v in items]
- values = [k for k,v in evals if v]
+ # TODO: https://github.com/behdad/harfbuzz/issues/525
+ if U == 0x1A7F: UISC = Consonant_Final; UIPC = Bottom
+
+ values = [k for k,v in items if v(U,UISC,UGC)]
assert len(values) == 1, "%s %s %s %s" % (hex(U), UISC, UGC, values)
USE = values[0]