fontlab_pens.stroke · declarations 001
apply_plan
apply_plan(glyph: Any, plan: StrokePlan, *, source: str, notify: str | None = 'Apply stroke plan', native: Any = None, expand: bool = False) -> dict[str, int]
Copy source open contours into one stroked element per named target layer.
All resolution and detached preparation precede live writes. History is initialized before committing, and one notification finalizes attempted writes even on failure. Native commits are not atomic; do not blindly retry.
apply_stroke
apply_stroke(shape: Any, style: StrokeStyle, *, native: Any = None) -> None
Apply supported fields, refusing unsupported values before any shape write.
This writes no history and sends no notification: use it on detached elements, or wrap a live element's edit in the layer's history step (as apply_plan does).
FontLab ignores setPen on varicolored shapes, so their QPen stays unchanged.
compatibility
compatibility(layers_or_recordings: Iterable[Any]) -> list[str]
Compare contour point counts/types; positions, metadata and components are ignored.
Inputs may be flLayer/flShape objects, RecordingPointPen objects, or their raw value iterables. This performs no native mutations or native imports.
expand_stroke
expand_stroke(shape: Any) -> None
Expand an element only when the host exposes the native operation.