mojo.pens

class DecomposePointPen()

A point pen that decomposes components into another point pen.

addComponent(baseGlyphName, transformation, identifier=None)

Add a sub glyph.

Inherits from subclass: fontTools.pens.pointPen.AbstractPointPen

addPoint(pt: Tuple[float, float], segmentType: Optional[str] = None, smooth: bool = False, name: Optional[str] = None, identifier: Optional[str] = None, **kwargs: Any) -> None

Add a point to the current sub path.

addVarComponent(glyphName: str, transformation: fontTools.misc.transform.DecomposedTransform, location: Dict[str, float], identifier: Optional[str] = None, **kwargs: Any) -> None

Add a VarComponent sub glyph. The ‘transformation’ argument must be a DecomposedTransform from the fontTools.misc.transform module, and the ‘location’ argument must be a dictionary mapping axis tags to their locations.

beginPath(identifier: Optional[str] = None, **kwargs: Any) -> None

Start a new sub path.

endPath() -> None

End the current sub path.

class PointDataPen()

A point pen that collects all point data and can draw it back into another pen.

drawPoints(pointPen, roundCoordinates=1)

Last edited on 17/05/2024