Merge "Update font chain linter to match latest font file" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
31c4a48267
@@ -486,12 +486,8 @@ def flag_sequence(territory_code):
|
||||
return tuple(0x1F1E6 + ord(ch) - ord('A') for ch in territory_code)
|
||||
|
||||
UNSUPPORTED_FLAGS = frozenset({
|
||||
flag_sequence('BL'), flag_sequence('BQ'), flag_sequence('DG'),
|
||||
flag_sequence('EA'), flag_sequence('EH'), flag_sequence('FK'),
|
||||
flag_sequence('GF'), flag_sequence('GP'), flag_sequence('GS'),
|
||||
flag_sequence('MF'), flag_sequence('MQ'), flag_sequence('NC'),
|
||||
flag_sequence('PM'), flag_sequence('RE'), flag_sequence('TF'),
|
||||
flag_sequence('WF'), flag_sequence('XK'), flag_sequence('YT'),
|
||||
flag_sequence('BL'), flag_sequence('BQ'), flag_sequence('MQ'),
|
||||
flag_sequence('RE'), flag_sequence('TF'),
|
||||
})
|
||||
|
||||
EQUIVALENT_FLAGS = {
|
||||
@@ -531,10 +527,17 @@ LEGACY_ANDROID_EMOJI = {
|
||||
ZWJ_IDENTICALS = {
|
||||
# KISS
|
||||
(0x1F469, 0x200D, 0x2764, 0x200D, 0x1F48B, 0x200D, 0x1F468): 0x1F48F,
|
||||
# FAMILY
|
||||
(0x1F468, 0x200D, 0x1F469, 0x200D, 0x1F466): 0x1F46A,
|
||||
}
|
||||
|
||||
SAME_FLAG_MAPPINGS = [
|
||||
# Diego Garcia and British Indian Ocean Territory
|
||||
((0x1F1EE, 0x1F1F4), (0x1F1E9, 0x1F1EC)),
|
||||
# St. Martin and France
|
||||
((0x1F1F2, 0x1F1EB), (0x1F1EB, 0x1F1F7)),
|
||||
# Spain and Ceuta & Melilla
|
||||
((0x1F1EA, 0x1F1F8), (0x1F1EA, 0x1F1E6)),
|
||||
]
|
||||
|
||||
ZWJ = 0x200D
|
||||
FEMALE_SIGN = 0x2640
|
||||
MALE_SIGN = 0x2642
|
||||
@@ -636,6 +639,9 @@ def compute_expected_emoji():
|
||||
all_sequences.add(reversed_seq)
|
||||
equivalent_emoji[reversed_seq] = sequence
|
||||
|
||||
for first, second in SAME_FLAG_MAPPINGS:
|
||||
equivalent_emoji[first] = second
|
||||
|
||||
# Remove unsupported flags
|
||||
all_sequences.difference_update(UNSUPPORTED_FLAGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user