summaryrefslogtreecommitdiff
path: root/scripts/run_android_tests.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2014-07-31 21:52:51 -0700
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:21 -0700
commit3e47204bfaf1693cdefc9c3599445a367c5d7d2e (patch)
treecf05984615f255acc3ccec45ff521854135b3ce4 /scripts/run_android_tests.py
parent985c16569167e1cc7d6d1dcf15df77135e67913f (diff)
Add missing cmap entry for U+2117 SOUND RECORDING COPYRIGHT.
The cmap was missing in Thin and Thin Italic fonts, although the glyph existed in the fonts.
Diffstat (limited to 'scripts/run_android_tests.py')
-rw-r--r--scripts/run_android_tests.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/run_android_tests.py b/scripts/run_android_tests.py
index 7880039..090d071 100644
--- a/scripts/run_android_tests.py
+++ b/scripts/run_android_tests.py
@@ -5,6 +5,8 @@ import glob
import unittest
from fontTools import ttLib
+from nototools import coverage
+from nototools import font_data
def load_fonts():
@@ -45,5 +47,28 @@ class TestDigitWidths(unittest.TestCase):
self.assertEqual(len(set(widths)), 1)
+class TestCharacterCoverage(unittest.TestCase):
+ """Tests character coverage."""
+
+ def setUp(self):
+ self.fonts = load_fonts()
+
+ def test_lack_of_arrows_and_combining_keycap(self):
+ """Tests that arrows and combining keycap are not in the fonts."""
+ for font in self.fonts:
+ charset = coverage.character_set(font)
+ self.assertNotIn(0x20E3, charset) # COMBINING ENCLOSING KEYCAP
+ self.assertNotIn(0x2191, charset) # UPWARDS ARROW
+ self.assertNotIn(0x2193, charset) # DOWNWARDS ARROW
+
+ def test_inclusion_of_sound_recording_copyright(self):
+ """Tests that sound recording copyright symbol is in the fonts."""
+ for font in self.fonts:
+ charset = coverage.character_set(font)
+ self.assertIn(
+ 0x2117, charset, # SOUND RECORDING COPYRIGHT
+ 'U+2117 not found in %s.' % font_data.font_name(font))
+
+
if __name__ == '__main__':
unittest.main()