gvar: log the glyph name if any exception is caught when decompiling deltas

This commit is contained in:
Cosimo Lupo 2019-04-03 10:53:25 +01:00
parent da6fe5f0e3
commit aef41419f2
No known key found for this signature in database
GPG Key ID: 179A8F0895A02F4F

View File

@ -107,8 +107,15 @@ class table__g_v_a_r(DefaultTable.DefaultTable):
glyph = ttFont["glyf"][glyphName]
numPointsInGlyph = self.getNumPoints_(glyph)
gvarData = data[offsetToData + offsets[i] : offsetToData + offsets[i + 1]]
self.variations[glyphName] = decompileGlyph_(
numPointsInGlyph, sharedCoords, axisTags, gvarData)
try:
self.variations[glyphName] = decompileGlyph_(
numPointsInGlyph, sharedCoords, axisTags, gvarData)
except Exception:
log.error(
"Failed to decompile deltas for glyph '%s' (%d points)",
glyphName, numPointsInGlyph,
)
raise
@staticmethod
def decompileOffsets_(data, tableFormat, glyphCount):