Drop unknown kern subtables

This commit is contained in:
Behdad Esfahbod 2013-07-24 18:51:05 -04:00
parent 8c4f7cc759
commit d4e33a7d83

View File

@ -722,6 +722,12 @@ def subset_glyphs (self, glyphs):
table.AttachList = None
return bool (table.LigCaretList or table.MarkAttachClassDef or table.GlyphClassDef or table.AttachList)
@add_method(fontTools.ttLib.getTableClass('kern'))
def prune_pre_subset (self, options):
# Prune unknown kern table types
self.kernTables = [t for t in self.kernTables if hasattr (t, 'kernTable')]
return bool (self.kernTables)
@add_method(fontTools.ttLib.getTableClass('kern'))
def subset_glyphs (self, glyphs):
for t in self.kernTables: