How to use the cu2qu.pens.Cu2QuPointPen function in cu2qu

To help you get started, we’ve selected a few cu2qu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googlefonts / ufo2ft / Lib / ufo2ft / filters / cubicToQuadratic.py View on Github external
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

cu2qu

Cubic-to-quadratic bezier curve conversion

MIT
Latest version published 2 years ago

Package Health Score

66 / 100
Full package analysis

Similar packages