summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/buildnumber.txt2
-rw-r--r--scripts/run_android_tests.py25
-rwxr-xr-xscripts/touchup_for_android.py3
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