diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2017-03-16 17:57:49 -0700 |
---|---|---|
committer | Roozbeh Pournader <roozbeh@google.com> | 2017-03-16 18:00:48 -0700 |
commit | fabeed69101c71c179461bd795a9c76878e896c2 (patch) | |
tree | 1cda5fca13368c323b21f97c0e101d2d6ddf673a /tools/fonts | |
parent | 849008cc5686bfdaa48876178c9c7277fbaad5c4 (diff) |
Update fontchain_lint.py to read Emoji 5.0 data
This corresponds to an update in emoji-zwj-sequences.txt in
I956ba139737bd79f5e31324ed77df9182342df4e.
Test: The updated script passes with the update data file.
Bug: 30999328
Change-Id: I989dee6e571645daa324ae3eb667e3a92a31511f
Diffstat (limited to 'tools/fonts')
-rwxr-xr-x | tools/fonts/fontchain_lint.py | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/tools/fonts/fontchain_lint.py b/tools/fonts/fontchain_lint.py index eb8a1ccd0d9e..008344cc9480 100755 --- a/tools/fonts/fontchain_lint.py +++ b/tools/fonts/fontchain_lint.py @@ -521,36 +521,21 @@ def compute_expected_emoji(): # add zwj sequences not in the current emoji-zwj-sequences.txt adjusted_emoji_zwj_sequences = dict(_emoji_zwj_sequences) adjusted_emoji_zwj_sequences.update(_emoji_zwj_sequences) - # single parent families + # Wrestlers with modifiers additional_emoji_zwj = ( - (0x1F468, 0x200D, 0x1F466), - (0x1F468, 0x200D, 0x1F467), - (0x1F468, 0x200D, 0x1F466, 0x200D, 0x1F466), - (0x1F468, 0x200D, 0x1F467, 0x200D, 0x1F466), - (0x1F468, 0x200D, 0x1F467, 0x200D, 0x1F467), - (0x1F469, 0x200D, 0x1F466), - (0x1F469, 0x200D, 0x1F467), - (0x1F469, 0x200D, 0x1F466, 0x200D, 0x1F466), - (0x1F469, 0x200D, 0x1F467, 0x200D, 0x1F466), - (0x1F469, 0x200D, 0x1F467, 0x200D, 0x1F467), - ) - # sequences formed from man and woman and optional fitzpatrick modifier - modified_extensions = ( - 0x2696, - 0x2708, - 0x1F3A8, - 0x1F680, - 0x1F692, + (0x1F93C, 0x1F3FB, 0x200D, 0x2640), + (0x1F93C, 0x1F3FB, 0x200D, 0x2642), + (0x1F93C, 0x1F3FC, 0x200D, 0x2640), + (0x1F93C, 0x1F3FC, 0x200D, 0x2642), + (0x1F93C, 0x1F3FD, 0x200D, 0x2640), + (0x1F93C, 0x1F3FD, 0x200D, 0x2642), + (0x1F93C, 0x1F3FE, 0x200D, 0x2640), + (0x1F93C, 0x1F3FE, 0x200D, 0x2642), + (0x1F93C, 0x1F3FF, 0x200D, 0x2640), + (0x1F93C, 0x1F3FF, 0x200D, 0x2642), ) for seq in additional_emoji_zwj: adjusted_emoji_zwj_sequences[seq] = 'Emoji_ZWJ_Sequence' - for ext in modified_extensions: - for base in (0x1F468, 0x1F469): - seq = (base, 0x200D, ext) - adjusted_emoji_zwj_sequences[seq] = 'Emoji_ZWJ_Sequence' - for modifier in range(0x1F3FB, 0x1F400): - seq = (base, modifier, 0x200D, ext) - adjusted_emoji_zwj_sequences[seq] = 'Emoji_ZWJ_Sequence' for sequence in _emoji_sequences.keys(): sequence = tuple(ch for ch in sequence if ch != EMOJI_VS) |