Add a ligature shaping test

This commit is contained in:
Kovid Goyal
2017-11-11 20:55:53 +05:30
parent 53e9f35c1f
commit 5f4e003bed
6 changed files with 34 additions and 7 deletions

Binary file not shown.

View File

@@ -70,6 +70,9 @@ class Rendering(BaseTest):
self.ae(len(cells), sz)
def test_shaping(self):
self.assertEqual(len(shape_string('abcd')), 4)
flags = [x.get('fl', 0) for x in shape_string('abcd')]
self.ae(flags, [0, 0, 0, 0])
flags = [x.get('fl', 0) for x in shape_string('e\u0347\u0305')]
self.assertEqual(flags, [0, 1, 1])
flags = [x.get('fl', 0) for x in shape_string('===', path='kitty_tests/FiraCode-Medium.otf')]
self.assertEqual(flags, [0, 1, 1])