Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def filter(self, glyph):
if not len(glyph):
return False
pen = Cu2QuPointPen(
glyph.getPointPen(),
self.context.absoluteError,
reverse_direction=self.options.reverseDirection,
stats=self.context.stats,
)
contours = list(glyph)
glyph.clearContours()
for contour in contours:
contour.drawPoints(pen)
return True