diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2015-01-07 11:54:35 -0800 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:24 -0700 |
commit | f78193176ea782adab14ca4bda517eeb699e571b (patch) | |
tree | 2e5f6e151f673d7d2adb9e8092be514c5191cf20 /scripts/run_general_tests.py | |
parent | 0fd852f5cb306362f44a89686356bbad47da93d9 (diff) |
Add test for non-formation of 'ff' ligature.
Also remove unused and tested touchups from the Android
touchup script.
Diffstat (limited to 'scripts/run_general_tests.py')
-rwxr-xr-x | scripts/run_general_tests.py | 14 |
1 files changed, 14 insertions, 0 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() |