diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2014-07-31 21:52:51 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:21 -0700 |
commit | 3e47204bfaf1693cdefc9c3599445a367c5d7d2e (patch) | |
tree | cf05984615f255acc3ccec45ff521854135b3ce4 | |
parent | 985c16569167e1cc7d6d1dcf15df77135e67913f (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.
-rw-r--r-- | res/buildnumber.txt | 2 | ||||
-rw-r--r-- | scripts/run_android_tests.py | 25 | ||||
-rwxr-xr-x | scripts/touchup_for_android.py | 3 |
3 files changed, 29 insertions, 1 deletions
diff --git a/res/buildnumber.txt b/res/buildnumber.txt index c27b13b..1610d7a 100644 --- a/res/buildnumber.txt +++ b/res/buildnumber.txt @@ -1 +1 @@ -01045
\ No newline at end of file +01046
\ No newline at end of file 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() diff --git a/scripts/touchup_for_android.py b/scripts/touchup_for_android.py index 8a942d9..2fa7896 100755 --- a/scripts/touchup_for_android.py +++ b/scripts/touchup_for_android.py @@ -66,6 +66,9 @@ def apply_temporary_fixes(font): # Fix the digit widths fix_digit_widths(font) + # Add cmap for U+2117 SOUND RECORDING COPYRIGHT + font_data.add_to_cmap(font, {0x2117, 'published'}) + # Fix version number from buildnumber.txt from datetime import date |