[varc] Add a conditional VarComponent test
This commit is contained in:
parent
d53c08a497
commit
9cb73dafeb
BIN
Tests/ttLib/data/varc-ac01-conditional.ttf
Normal file
BIN
Tests/ttLib/data/varc-ac01-conditional.ttf
Normal file
Binary file not shown.
@ -263,6 +263,21 @@ class TTGlyphSetTest(object):
|
|||||||
|
|
||||||
assert actual == expected, (actual, expected)
|
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):
|
def test_glyphset_varComposite1(self):
|
||||||
font = TTFont(self.getpath("varc-ac00-ac01.ttf"))
|
font = TTFont(self.getpath("varc-ac00-ac01.ttf"))
|
||||||
glyphset = font.getGlyphSet(location={"wght": 600})
|
glyphset = font.getGlyphSet(location={"wght": 600})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user