Skip to content

fontlab_pens.stroke

stroke

Validated stroke descriptions and capability-gated writes to FontLab elements.

Variants follow Proteus percentages: proportion and contrast are rounded to two percentage decimal places, so finer input precision is intentionally not retained. Native imports are lazy. Plans stage all shapes before touching live layers; a native commit failure can still leave partial geometry, as with FlPointPen.

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
apply_plan function (glyph: Any, plan: StrokePlan, *, source: str, notify: str | None='Apply stroke plan', native: Any=None, expa… Copy source open contours into one stroked element per named target layer.
apply_stroke function (shape: Any, style: StrokeStyle, *, native: Any=None) -> None Apply supported fields, refusing unsupported values before any shape write.
compatibility function (layers_or_recordings: Iterable[Any]) -> list[str] Compare contour point counts/types; positions, metadata and components are ignored.
expand_stroke function (shape: Any) -> None Expand an element only when the host exposes the native operation.