diff --git a/Tests/ttLib/data/varc-ac01-conditional.ttf b/Tests/ttLib/data/varc-ac01-conditional.ttf new file mode 100644 index 000000000..5de72506d Binary files /dev/null and b/Tests/ttLib/data/varc-ac01-conditional.ttf differ diff --git a/Tests/ttLib/ttGlyphSet_test.py b/Tests/ttLib/ttGlyphSet_test.py index d4bc5ad85..7c95a847b 100644 --- a/Tests/ttLib/ttGlyphSet_test.py +++ b/Tests/ttLib/ttGlyphSet_test.py @@ -263,6 +263,21 @@ class TTGlyphSetTest(object): assert actual == expected, (actual, expected) + def test_glyphset_varComposite_conditional(self): + font = TTFont(self.getpath("varc-ac01-conditional.ttf")) + + glyphset = font.getGlyphSet() + pen = RecordingPen() + glyph = glyphset["uniAC01"] + glyph.draw(pen) + assert len(pen.value) == 2 + + glyphset = font.getGlyphSet(location={"wght": 800}) + pen = RecordingPen() + glyph = glyphset["uniAC01"] + glyph.draw(pen) + assert len(pen.value) == 3 + def test_glyphset_varComposite1(self): font = TTFont(self.getpath("varc-ac00-ac01.ttf")) glyphset = font.getGlyphSet(location={"wght": 600})