summaryrefslogtreecommitdiff
path: root/tools/fonts
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2016-03-31 13:05:32 -0700
committerRoozbeh Pournader <roozbeh@google.com>2016-03-31 13:23:15 -0700
commit27ec3ace18e329eb9654f297dedf667f94baaf81 (patch)
tree4ff33d2ba3195aa9389b50d03e0809f1af09565b /tools/fonts
parentbb8c30901dc0d17c4da6ef0d68c4ad2808fd0ded (diff)
Re-enable emoji font tests
This re-enables the emoji font tests, but doesn't run the tests if SMALLER_FONT_FOOTPRINT is set. Additionally, we test that there's one and only one emoji font in the fallback chain. Bug: 26187231 Bug: 27785690 Change-Id: I2e6d467e3f54ee3d41737170d7c2492a0f6b30f0
Diffstat (limited to 'tools/fonts')
-rwxr-xr-xtools/fonts/fontchain_lint.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/fonts/fontchain_lint.py b/tools/fonts/fontchain_lint.py
index 75e837b43cfc..b5ed1b52a19d 100755
--- a/tools/fonts/fontchain_lint.py
+++ b/tools/fonts/fontchain_lint.py
@@ -177,9 +177,10 @@ def parse_fonts_xml(fonts_xml_path):
def check_emoji_availability():
emoji_fonts = [font[5] for font in _fallback_chain if 'Zsye' in font[1]]
+ assert len(emoji_fonts) == 1, 'There are %d emoji fonts.' % len(emoji_fonts)
+ emoji_font = emoji_fonts[0]
emoji_chars = _emoji_properties['Emoji']
- for emoji_font in emoji_fonts:
- assert_font_supports_all_of_chars(emoji_font, emoji_chars)
+ assert_font_supports_all_of_chars(emoji_font, emoji_chars)
def check_emoji_defaults():
@@ -273,11 +274,12 @@ def main():
hyphens_dir = path.join(target_out, 'usr', 'hyphen-data')
check_hyphens(hyphens_dir)
- ucd_path = sys.argv[2]
- parse_ucd(ucd_path)
- # Temporarily disable emoji checks for Bug 27785690
- # check_emoji_availability()
- # check_emoji_defaults()
+ check_emoji = sys.argv[2]
+ if check_emoji == 'true':
+ ucd_path = sys.argv[3]
+ parse_ucd(ucd_path)
+ check_emoji_availability()
+ check_emoji_defaults()
if __name__ == '__main__':