[ttx] ignore missing 'head' if no --recalc-timestamp option is passed

This commit is contained in:
Cosimo Lupo 2017-02-28 22:54:30 +00:00
parent 8af488a1b3
commit ee4f4695e6
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419

View File

@ -271,7 +271,7 @@ def ttCompile(input, output, options):
allowVID=options.allowVID) allowVID=options.allowVID)
ttf.importXML(input) ttf.importXML(input)
if not options.recalcTimestamp: if not options.recalcTimestamp and 'head' in ttf:
# use TTX file modification time for head "modified" timestamp # use TTX file modification time for head "modified" timestamp
mtime = os.path.getmtime(input) mtime = os.path.getmtime(input)
ttf['head'].modified = timestampSinceEpoch(mtime) ttf['head'].modified = timestampSinceEpoch(mtime)