Skip to content

fontlab_pens.fontgate.FontGatePointPen

FontGatePointPen

Point pen that writes validated contours into an fgLayer or an fgShape.

A layer target gets one new element, created lazily with the first contour and reused for the rest of the session. Coordinates are layer coordinates for a layer target and element-space-before-matrix for an element target: they are mapped through the inverse of layer.matrix or shape.matrix respectively, so draw_points on the same target reads them back.

The target kind is detected from the native type name. Pass kind="layer" or kind="element" to state it instead, for a wrapper or test double that behaves like an fgLayer or fgShape.

Source bases

Inherited member index

Source-proven inherited members; local declarations override these entries.

  • addPoint — defined by fontlab_pens._native.StagingPointPen.addPoint
  • addVarComponent — defined by fontlab_pens.point.AbstractPointPen.addVarComponent
  • check_component — defined by fontlab_pens._native.StagingPointPen.check_component
  • endPath — defined by fontlab_pens._native.StagingPointPen.endPath

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
__enter__ function (self) -> Self (shared captured text)
__exit__ function (self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None Close on success; on an exception drop the open contour and close.
__init__ function (self, target: Any, *, native: Any=None, kind: str | None=None) -> None
addComponent function (self, baseGlyphName: str, transformation: tuple, identifier: str | None=None, **kwargs: Any) -> None
append_contour function (self, points: list[StagedPoint]) -> None
beginPath function (self, identifier: str | None=None, **kwargs: Any) -> None
close function (self) -> None End the session; contours were already written at each endPath.