summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-01-07 11:54:35 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:24 -0700
commitf78193176ea782adab14ca4bda517eeb699e571b (patch)
tree2e5f6e151f673d7d2adb9e8092be514c5191cf20
parent0fd852f5cb306362f44a89686356bbad47da93d9 (diff)
Add test for non-formation of 'ff' ligature.
Also remove unused and tested touchups from the Android touchup script.
-rwxr-xr-xscripts/run_general_tests.py14
-rwxr-xr-xscripts/touchup_for_android.py16
2 files changed, 14 insertions, 16 deletions
diff --git a/scripts/run_general_tests.py b/scripts/run_general_tests.py
index 18c4c29..ed327bb 100755
--- a/scripts/run_general_tests.py
+++ b/scripts/run_general_tests.py
@@ -8,6 +8,7 @@ from fontTools import ttLib
from nototools import coverage
from nototools import font_data
+import layout
def load_fonts():
"""Load all major fonts."""
@@ -109,5 +110,18 @@ class TestCharacterCoverage(unittest.TestCase):
'U+2117 not found in %s.' % font_data.font_name(font))
+class TestLigatures(unittest.TestCase):
+ """Tests formation or lack of formation of ligatures."""
+
+ def setUp(self):
+ self.fontfiles, _ = load_fonts()
+
+ def test_lack_of_ff_ligature(self):
+ """Tests that the ff ligature is not formed by default."""
+ for fontfile in self.fontfiles:
+ advances = layout.get_advances('ff', fontfile)
+ self.assertEqual(len(advances), 2)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/scripts/touchup_for_android.py b/scripts/touchup_for_android.py
index 67fb77f..c8b844a 100755
--- a/scripts/touchup_for_android.py
+++ b/scripts/touchup_for_android.py
@@ -28,22 +28,6 @@ def drop_lookup(table, lookup_number):
def apply_temporary_fixes(font):
"""Apply some temporary fixes.
"""
- # Drop the lookup forming the ff ligature
- # https://code.google.com/a/google.com/p/roboto/issues/detail?id=47
- drop_lookup(font['GSUB'], 5)
-
- # Correct the ccmp lookup to use combining marks instead of spacing ones
- # https://code.google.com/a/google.com/p/roboto/issues/detail?id=48
- fix_ccmp_lookup(font)
-
- # Fix the digit widths
- # https://code.google.com/a/google.com/p/roboto/issues/detail?id=49
- fix_digit_widths(font)
-
- # Add cmap for U+2117 SOUND RECORDING COPYRIGHT
- # https://code.google.com/a/google.com/p/roboto/issues/detail?id=44
- font_data.add_to_cmap(font, {0x2117: 'published'})
-
# Fix version number from buildnumber.txt
# https://code.google.com/a/google.com/p/roboto/issues/detail?id=50
from datetime import date