fontlab_pens.fontlab
fontlab
Pens and readers over FontLab (fontlab.fl*) layers and elements.
Targets are an flLayer or an flShape (element), never an flGlyph.
Contours are staged and validated in Python; close() (or leaving the with
block) writes them: a layer gets one new flShape holding all of them, an
element gets them appended. On a layer, addComponent is staged too and
close() adds the component elements and the contour shape in call order.
An exception in the drawing body writes nothing; a native commit failure may
leave partial geometry. The pen is spent even when a commit or notify fails.
An element cannot hold components, and a component element cannot take contours.
No undo history is recorded unless notify="title" is given for an attached
layer. Notification can change unrelated native timestamps; whole-font history
preservation is not guaranteed. Bare elements do not support notification.
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 |
|---|---|---|---|
draw |
function | (target: Any, pen: AbstractPen, *, components: bool=True, transform: bool=True) -> None |
Segment-pen reader: draw_points through PointToSegmentPen. (shared captured text) |
draw_points |
function | (target: Any, pen: AbstractPointPen, *, components: bool=True, transform: bool=True) -> None |
Draw an flLayer (every element) or one flShape into a point pen. |