Skip to content

fontlab_pens.base.AbstractPen

AbstractPen

The segment-pen protocol; subclassing documents that a class implements it.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
addComponent function (self, glyphName: str, transformation: TransformLike) -> None Add a sub glyph with a 6-number affine transformation.
addVarComponent function (self, glyphName: str, transformation: Any, location: dict[str, float], *, resetUnspecifiedAxes: bool=False) … Add a variable component; glyph sets decompose these, so pens raise.
closePath function (self) -> None Close the current sub path.
curveTo function (self, *points: Point) -> None Draw a cubic bezier; more than two off-curves form a super-bezier.
endPath function (self) -> None End the current sub path without closing it.
lineTo function (self, pt: Point) -> None Draw a straight line from the current point to pt.
moveTo function (self, pt: Point) -> None Begin a new sub path at pt; end it with closePath or endPath.
qCurveTo function (self, *points: Point | None) -> None Draw a TrueType quadratic string; the last point may be None.