diff options
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() |