fontlab_pens.fontgate
fontgate
Pens and readers over FontGate (fontgate.fg*) layers and elements.
Targets are an fgLayer or an fgShape (element), never an fgGlyph.
Writing to a layer creates one new element for the pen session; writing to an
element appends to it. Each contour is validated in Python first, then stored
with a single contour.nodes = [...] assignment (point names and smooth flags
kept). FontGate components are glyph-level only, so addComponent raises
ComponentError. Empty native contours are never handed to native
drawPoints, which dereferences the first node unchecked.
The native fgPen fast path is not offered: it binds to a glyph's work shape,
which conflicts with the layer/element rule.
Classes
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 |
|---|---|---|---|
FONTGATE_NODE_TYPES |
attribute | FontGate fgNode type name for each staged_node_kinds kind. |
|
draw |
function | (target: Any, pen: AbstractPen, *, components: bool=True, transform: bool=True) -> None |
Segment-pen reader: draw_points through PointToSegmentPen. |
draw_contour_points |
function | (contour: Any, pen: AbstractPointPen, transform: tuple | None=None) -> None |
Emit one fgContour as UFO points, optionally through a 6-tuple transform. |
draw_points |
function | (target: Any, pen: AbstractPointPen, *, components: bool=True, transform: bool=True) -> None |
Draw an fgLayer (all elements, layer × element matrix) or one fgShape. |
edit_geometry_ready |
function | (target: Any) -> bool |
True when every contour of the target is valid pen geometry. |