summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-04-26 23:29:27 -0700
committerRoozbeh Pournader <roozbeh@google.com>2015-04-26 23:29:27 -0700
commit8faeb294ae6ae7cc3f4a90915d3660830c76ecef (patch)
tree6aef1dae69f2adaacc3861dc22f4fe3797a4ba42
parentbde0bbc0c82b56ede1ebc7e7c67091a2276548ea (diff)
Add tests for s-t and longs-t discretionary ligatures.
-rw-r--r--scripts/common_tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/common_tests.py b/scripts/common_tests.py
index 07b41b1..1b015b8 100644
--- a/scripts/common_tests.py
+++ b/scripts/common_tests.py
@@ -245,6 +245,15 @@ class TestLigatures(FontTest):
advances = layout.get_advances('ff', fontfile)
self.assertEqual(len(advances), 2)
+ def test_st_ligatures(self):
+ """Tests that st ligatures are formed by dlig."""
+ for fontfile in self.fontfiles:
+ for combination in [u'st', u'ſt']:
+ normal = layout.get_glyphs(combination, fontfile)
+ ligated = layout.get_glyphs(
+ combination, fontfile, '--features=dlig')
+ self.assertTrue(len(normal) == 2 and len(ligated) == 1)
+
class TestVerticalMetrics(FontTest):
"""Test the vertical metrics of fonts."""