#36 crash when 'post' table could not be decompiled

open
nobody
TrueType (18)
5
2014-01-16
2009-12-08
Bram Tassyns
No

Fix:

in fontTools/ttLib/__init__.py, line 415

Add additional check to see if the 'post' object is of type DefaultTable before calling getGlyphOrder (this causes AttributeError: DefaultTable instance has no attribute 'getGlyphOrder' ).

I tested this with a check like:

if self['post'].__class__.__name__=='DefaultTable':
self._getGlyphNamesFromCmap()

before calling glyphOrder = self['post'].getGlyphOrder()

Discussion

  • Paul Wise
    Paul Wise
    2011-02-13

    Could you please give the name of the font that causes this crash, so that I can reproduce it and verify the fix.

     

  • Anonymous
    2011-12-07

    osaka.ttf in mac (snow leopard), throws error like this

     

  • Anonymous
    2012-06-22

    This bug happens with fonts with a format 4.0 post table like Osaka and Osaka Mono or AppleGothic, Apple LiGothic and Hei in earlier OS X versions.