[woff2] Add fvar to glyf dependencies
Since the VarComposites added fvar to glyf dependencies in ttLib. Add test for VarComposite to woff2 tests.
This commit is contained in:
parent
7db21cd197
commit
6755acceee
@ -294,7 +294,8 @@ class WOFF2Writer(SFNTWriter):
|
|||||||
if self.sfntVersion == "OTTO":
|
if self.sfntVersion == "OTTO":
|
||||||
return
|
return
|
||||||
|
|
||||||
for tag in ("maxp", "head", "loca", "glyf"):
|
for tag in ("maxp", "head", "loca", "glyf", "fvar"):
|
||||||
|
if tag in self.tables:
|
||||||
self._decompileTable(tag)
|
self._decompileTable(tag)
|
||||||
self.ttFont["glyf"].padding = padding
|
self.ttFont["glyf"].padding = padding
|
||||||
for tag in ("glyf", "loca"):
|
for tag in ("glyf", "loca"):
|
||||||
|
@ -1491,6 +1491,20 @@ class UShort255Test(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class VarCompositeTest(unittest.TestCase):
|
||||||
|
def test_var_composite(self):
|
||||||
|
input_path = os.path.join(data_dir, "varc-ac00-ac01.ttf")
|
||||||
|
ttf = ttLib.TTFont(input_path)
|
||||||
|
ttf.flavor = "woff2"
|
||||||
|
out = BytesIO()
|
||||||
|
ttf.save(out)
|
||||||
|
|
||||||
|
ttf = ttLib.TTFont(out)
|
||||||
|
ttf.flavor = None
|
||||||
|
out = BytesIO()
|
||||||
|
ttf.save(out)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user