workaround for currupt (?) cmap subtable
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@128 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
731e4377e1
commit
ae180248fd
@ -24,6 +24,8 @@ class table__c_m_a_p(DefaultTable.DefaultTable):
|
|||||||
">HHl", data[4+i*8:4+(i+1)*8])
|
">HHl", data[4+i*8:4+(i+1)*8])
|
||||||
platformID, platEncID = int(platformID), int(platEncID)
|
platformID, platEncID = int(platformID), int(platEncID)
|
||||||
format, length = struct.unpack(">HH", data[offset:offset+4])
|
format, length = struct.unpack(">HH", data[offset:offset+4])
|
||||||
|
if not length:
|
||||||
|
continue # bogus cmap subtable?
|
||||||
if not cmap_classes.has_key(format):
|
if not cmap_classes.has_key(format):
|
||||||
table = cmap_format_unknown(format)
|
table = cmap_format_unknown(format)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user