Allow decompiling bad ClassDef tables with invalid format
Fixes https://github.com/fonttools/fonttools/issues/1235
This commit is contained in:
parent
c5c161c055
commit
dde854d285
@ -482,7 +482,7 @@ class Coverage(FormatSwitchingBaseTable):
|
|||||||
glyphs.extend(glyphOrder[glyphID] for glyphID in range(startID, endID))
|
glyphs.extend(glyphOrder[glyphID] for glyphID in range(startID, endID))
|
||||||
else:
|
else:
|
||||||
self.glyphs = []
|
self.glyphs = []
|
||||||
log.warning("Unknown Coverage format: %s" % self.Format)
|
log.warning("Unknown Coverage format: %s", self.Format)
|
||||||
|
|
||||||
def preWrite(self, font):
|
def preWrite(self, font):
|
||||||
glyphs = getattr(self, "glyphs", None)
|
glyphs = getattr(self, "glyphs", None)
|
||||||
@ -830,7 +830,7 @@ class ClassDef(FormatSwitchingBaseTable):
|
|||||||
if cls:
|
if cls:
|
||||||
classDefs[glyphOrder[glyphID]] = cls
|
classDefs[glyphOrder[glyphID]] = cls
|
||||||
else:
|
else:
|
||||||
assert 0, "unknown format: %s" % self.Format
|
log.warning("Unknown ClassDef format: %s", self.Format)
|
||||||
self.classDefs = classDefs
|
self.classDefs = classDefs
|
||||||
|
|
||||||
def _getClassRanges(self, font):
|
def _getClassRanges(self, font):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user