added workaround for buggy Apple fonts

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@122 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
Just 2000-10-13 13:51:33 +00:00
parent 43fa4be948
commit 481fb09495

View File

@ -92,6 +92,9 @@ class table_O_S_2f_2(DefaultTable.DefaultTable):
def decompile(self, data, ttFont): def decompile(self, data, ttFont):
dummy, data = sstruct.unpack2(OS2_format_0, data, self) dummy, data = sstruct.unpack2(OS2_format_0, data, self)
if self.version == 1 and not data:
# workaround for buggy Apple fonts
self.version = 0
if self.version == 1: if self.version == 1:
sstruct.unpack(OS2_format_1_addition, data, self) sstruct.unpack(OS2_format_1_addition, data, self)
elif self.version == 2: elif self.version == 2: