diff options
-rwxr-xr-x | scripts/run_general_tests.py | 14 | ||||
-rwxr-xr-x | scripts/touchup_for_android.py | 16 |
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 |