woff2_test: add test with CBDT/CBLC font without glyf/loca tables
This commit is contained in:
parent
be147e965d
commit
0d53cfbb99
@ -1199,6 +1199,24 @@ class WOFF2RoundtripTest(object):
|
||||
assert tmp.getvalue() == tmp2.getvalue()
|
||||
assert ttFont2.reader.flavorData.transformedTables == {"hmtx"}
|
||||
|
||||
def test_roundtrip_no_glyf_and_loca_tables(self):
|
||||
ttx = os.path.join(
|
||||
os.path.dirname(current_dir), "subset", "data", "google_color.ttx"
|
||||
)
|
||||
ttFont = ttLib.TTFont()
|
||||
ttFont.importXML(ttx)
|
||||
|
||||
assert "glyf" not in ttFont
|
||||
assert "loca" not in ttFont
|
||||
|
||||
ttFont.flavor = "woff2"
|
||||
tmp = BytesIO()
|
||||
ttFont.save(tmp)
|
||||
|
||||
tmp2, ttFont2 = self.roundtrip(tmp)
|
||||
assert tmp.getvalue() == tmp2.getvalue()
|
||||
assert ttFont.flavor == "woff2"
|
||||
|
||||
|
||||
class MainTest(object):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user