summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Felt <dougfelt@google.com>2016-04-29 13:20:05 -0700
committerRaph Levien <raph@google.com>2016-04-29 14:17:57 -0700
commitce51db00ecdd2a30033b4bb6a197d0a65ca909a9 (patch)
tree1e0b2f15395011fe12c6220a16dd98f8d86e9c27
parent90a225d46d5f674b144fb3942623797b0b537871 (diff)
Patch fontchain_lint to exclude modern_pentathlon.
Fix build breakage. Bug: 28426800 Change-Id: Idcc8f1b66014b25758c163d908d34f06011d9927
-rwxr-xr-xtools/fonts/fontchain_lint.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/fonts/fontchain_lint.py b/tools/fonts/fontchain_lint.py
index 81ab3ccf3ec5..fe7c3b9b400f 100755
--- a/tools/fonts/fontchain_lint.py
+++ b/tools/fonts/fontchain_lint.py
@@ -330,7 +330,7 @@ def check_emoji_defaults(default_emoji):
0x2764, # HEAVY BLACK HEART
}
assert missing_text_chars == set(), (
- 'Text style version of some emoji characters are missing.')
+ 'Text style version of some emoji characters are missing: ' + repr(missing_text_chars))
# Setting reverse to true returns a dictionary that maps the values to sets of
@@ -411,6 +411,20 @@ def parse_ucd(ucd_path):
_emoji_zwj_sequences = parse_unicode_datafile(
path.join(ucd_path, 'emoji-zwj-sequences.txt'))
+ # filter modern pentathlon, as it seems likely to be removed from final spec
+ def is_excluded(n):
+ return n == 0x1f93b
+
+ def contains_excluded(t):
+ if type(t) == int:
+ return is_excluded(t)
+ return any(is_excluded(cp) for cp in t)
+
+ # filter modern pentathlon, as it seems likely to be removed from final spec
+ _emoji_properties['Emoji'] = set(
+ t for t in _emoji_properties['Emoji'] if not contains_excluded(t))
+ _emoji_sequences = dict(
+ (t, v) for (t, v) in _emoji_sequences.items() if not contains_excluded(t))
def flag_sequence(territory_code):
return tuple(0x1F1E6 + ord(ch) - ord('A') for ch in territory_code)