be relaxed about zero padding the input data to 4-byte boundaries

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@87 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
Just 2000-02-21 21:30:32 +00:00
parent 222aea7fca
commit 7268e24408

View File

@ -33,7 +33,10 @@ class table__h_e_a_d(DefaultTable.DefaultTable):
dependencies = ['maxp', 'loca']
def decompile(self, data, ttFont):
sstruct.unpack(headFormat, data, self)
dummy, rest = sstruct.unpack2(headFormat, data, self)
if rest:
# this is quite illegal, but there seem to be fonts out there that do this
assert rest == "\0\0"
self.unitsPerEm = int(self.unitsPerEm)
self.strings2dates()