Skip to content

fontlabapp.fontui.teaching_writers.node_table

node_table

What: Inspect all own nodes of the current glyph layer and edit X and Y. How: Read node order, coordinates, types and canvas selection. Stage numeric cells in a non-modal table. Apply writes accepted edits through App's outline writer and history.commit. An Apply that changes coordinates is recorded as one Undo step. Why: A complete node table exposes unselected points and keeps refused rows. Usage: Open a glyph. Refresh reads its active layer and discards local cell edits. Table selection selects canvas nodes; Read Canvas Selection reads the other direction without discarding cell edits. Edit X/Y, then press Apply. Refresh caches auto-layer facts; Apply scans them again. Selection reads only the current layer and synchronizes own nodes even when coordinate edits are refused. Selection flags are verified; unsynced rows are named in the status. Benefit: Inspect and edit exact node coordinates without changing node order. Coordinates use each shape's local space. Translated shapes remain editable; components, shared outlines, transformed or locked shapes, locked layers, auto layers and bases of auto composites stay as named kept rows. Invalid numeric cells and nodes changed since Refresh are kept independently. Node types are read-only. Distance and angle columns are outside this table. Window > Panels > Node edits selected canvas points; this table lists every own node and synchronizes its row selection with the canvas.

Independent behaviour-only rewrite of the node-table idea from Outline.py. Credit: Vassil Kateliev and Karandash Type Foundry; kateliev/TypeRig, MPL-2.0. No TypeRig code, comments, icons or resources are included. Setup: FontLab 9, Python 3.11, Fly and App>=0.2.150.dev0.

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
Key attribute
TITLE attribute
apply_edits function (snapshot: Snapshot, cells: dict[Key, tuple[str, str]], native: Any=None) -> ApplyResult Write valid fresh rows once; keep each refused or invalid row independently.
capture_nodes function (native: Any=None, *, facts: Any=None) -> Snapshot Refresh/Apply scan once; selection and post-Apply reads reuse cached facts.
current_context function (native: Any) -> tuple[tuple[int, int, int, int], Any, Any, Any] Map the active FontGate glyph by fgId into its registered font.
main function () -> None Use FontLab's existing event loop and parent window.
native_module function (native: Any=None) -> Any Resolve the host lazily and require its main UI thread.
read_rows function (layer: Any, deadline: float) -> tuple[NodeRow, ...] Read current-layer nodes and shape guards only; never scan font dependencies.
same_geometry function (left: NodeRow, right: NodeRow) -> bool Ignore selection changes while guarding coordinates, order and type.
select_nodes function (snapshot: Snapshot, chosen: set[Key], native: Any=None) -> dict[Key, str] Sync every own node independently of edit refusals; name failed rows.
show function (qt: Any, parent: Any, *, embedded: bool=False) -> Any Open an owned editable table; drain callbacks on Close or setup failure.