support for CEF fonts: don't depend on the head table being available

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@405 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
jvr 2003-08-22 19:38:37 +00:00
parent 07dd0e4504
commit f509c0f070

View File

@ -129,9 +129,13 @@ class SFNTWriter:
directory = sstruct.pack(sfntDirectoryFormat, self)
self.file.seek(sfntDirectorySize)
seenHead = 0
for tag, entry in tables:
if tag == "head":
seenHead = 1
directory = directory + entry.toString()
self.calcMasterChecksum(directory)
if seenHead:
self.calcMasterChecksum(directory)
self.file.seek(0)
self.file.write(directory)
if closeStream: