Skip to content

fontlabapp.studios.layer_manager._from_font

_from_font

Deliver tab, mode "Copy layers from font": the Examples "Copy Layers From Font" (Scripts/Tools/).

The current font is the destination; the source font is chosen from the open fonts. Map source and destination layer names, choose a collision mode, press Preview, inspect the kept rows, confirm, then Copy. Copy re-surveys both fonts and refuses a plan that differs from the Preview ("Source or destination changed; Preview again."), then writes ONE Layer Manager: copy layers from font <subject> Undo step in the destination through AppShell.history with the destination window guards (window=). The source is only read. The name checks, font resolution, capture, survey and clone repair are the original's, verbatim. Native cross-font Undo and Redo are not qualified here (Scriptmix TODO, T29).

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 (shared captured text)
MODES attribute (shared captured text)
TITLE attribute (shared captured text)
anchors attribute
apply_plan function (tool: Any, plan: dict[str, Any], confirmed: bool, title: str=TITLE) -> dict[str, Any] Recheck the visible plan and write one destination Undo step (the original's, through <code>AppShell.history</code>).
checked_name function (name: str) -> str Reject recipe, temporary and lossy text syntax before any write. (shared captured text)
clone_shapes function (layer: Any) -> list[Any] Restore clone losses through contour_copy before history starts.
collision function (name: str, suffix: str, mode: str, exists: bool) -> tuple[str, str | None] Return the incoming name and optional destination backup name. (shared captured text)
copies attribute
fl attribute
guards attribute
layer_data function (layer: Any, deadline: float) -> dict[str, Any] Snapshot each nodes() once; never use Python wrapper identity as a key. (shared captured text)
make_plan function (source_id: int, destination_id: int, names: list[str], mappings: list[tuple[str, str]], mode: str, suffix: s… Run one destination dependency scan per explicit Preview.
registered_fonts function () -> dict[int, tuple[str, Any]] Read registered packages without activating or completing any source font.
resolve function (source_id: int, destination_id: int) -> tuple[Any, Any] Require two registered fonts, equal units per em and the current destination.
scripting attribute
survey function (source: Any, destination: Any, names: list[str], mappings: list[tuple[str, str]], mode: str, suffix: str, fa… Keep every refused glyph/layer row; plan only the selected destination names.
usable function (layer: Any, *, source: bool) -> None Refuse content the copy cannot preserve, rather than silently dropping it. (shared captured text)
writer attribute