Catch explosion on open paths

This commit is contained in:
Simon Cozens 2020-11-20 10:01:51 +00:00
parent 61814d41f5
commit fdbe0763df

View File

@ -121,7 +121,11 @@ def test(glyphsets, glyphs=None, names=None):
for contour in contourPens:
nodeTypes.append(tuple(instruction[0] for instruction in contour.value))
stats = StatisticsPen(glyphset=glyphset)
contour.replay(stats)
try:
contour.replay(stats)
except NotImplementedError as e:
print('%s: Glyph cannot be interpolated - open path!' % glyph_name)
break
size = abs(stats.area) ** .5 * .5
vector = (
int(size),