parent
a226c4772b
commit
34fec90630
@ -273,6 +273,21 @@ class SubsetTest(unittest.TestCase):
|
||||
subsetfont = TTFont(subsetpath)
|
||||
self.expect_ttx(subsetfont, self.getpath("expect_notdef_width_cid.ttx"), ["CFF "])
|
||||
|
||||
def test_recalc_timestamp(self):
|
||||
ttxpath = self.getpath("TestTTF-Regular.ttx")
|
||||
font = TTFont()
|
||||
font.importXML(ttxpath)
|
||||
modified = font['head'].modified
|
||||
_, fontpath = self.compile_font(ttxpath, ".ttf")
|
||||
subsetpath = self.temp_path(".ttf")
|
||||
|
||||
# by default, the subsetter does not recalculate the modified timestamp
|
||||
subset.main([fontpath, "--output-file=%s" % subsetpath, "*"])
|
||||
self.assertEqual(modified, TTFont(subsetpath)['head'].modified)
|
||||
|
||||
subset.main([fontpath, "--recalc-timestamp", "--output-file=%s" % subsetpath, "*"])
|
||||
self.assertLess(modified, TTFont(subsetpath)['head'].modified)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(unittest.main())
|
||||
|
Loading…
x
Reference in New Issue
Block a user