Skip to content

fontlabapp.fontui.node_editor.duplicate

duplicate

Insert coincident nodes, with optional coincident cubic handles.

What: Duplicate selected on-curve nodes in selected editor layers or masters. How: Read node indices from each glyph's selected reference layer. Require the same contour closure and node types in every target master, then insert backwards. The optional two handles create a zero-length cubic instead of a line. Why: One selection controls corresponding nodes across masters. Unrelated glyphs never inherit indices from the first glyph. The table previews counts. Use: Select nodes, open this panel, choose scope and handles, then Duplicate. Reload selection after changing glyphs. Disable Keep masters compatible only when you intend to edit the current master separately. Benefit: Prepare matching contour construction without dragging new nodes.

Locked, shared, transformed, quadratic and automatic outlines are kept and listed. Other glyphs in the selection can still be edited. Master scope targets only master layers. Only selected editor layers also supports manual auxiliary layers and intentionally changes their structure without a cross-master compatibility check. The change is recorded as one Undo step. Existing nodes and shape metadata stay; new nodes are sharp. Both handle positions coincide with the selected point, so the added segment has no area.

Independent behaviour-only rewrite after Fernando Díaz, Reset Type Studio, https://github.com/Reset-Type-Studio/Glyphs-Scripts, Apache-2.0 declared in README.md (no separate LICENSE file). Sources: Paths/Node Duplicator (all masters).py, Paths/Node Duplicator (current layer).py, and Paths/Node Duplicator + 2 Handles (all masters).py. No source code copied.

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
CAPTURE_SECONDS attribute (shared captured text)
KEY attribute
TITLE attribute
contours_of function (layer: Any) -> tuple[list[Any], str] Return safe own contours and a per-layer reason when content is kept.
duplicate_changes function (glyph: Any, layer: Any, reference: str, handles: bool) -> list[outline_writer.Change] Map this glyph's live reference selection to structurally equal targets.
main function () -> Any Open the modeless panel; report font and selection errors safely.
signature function (contours: list[Any]) -> tuple[Any, ...] Contour order, closure and full on/off pattern prove index correspondence.