fontlabapp.studios.layer_manager._restore
_restore
Backups tab, Restore mode: the Scriptmix "Restore Backup Layer" (Scripts/Masters/).
Copy a chosen backup layer back into the master layer it belongs to
(contours replaced by repaired clones, same-named anchors moved, advance
width set), for every selected glyph; optionally delete the backup and
its mask. The planning is the original's, verbatim, with the App's shared
backup rule (masters.inspect.model.backup_master). A shown or locked
backup is kept and counted. The components of deleted layers are read
before the edit and retained (fl#7641). Restore plans again, refuses a
plan that differs from the list, and writes ONE
Layer Manager: restore backup <subject> Undo step through
AppShell.history; layer deletion keeps the original's
glyph.removeLayer route inside that step.
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 | ||
LINK_FIELDS |
attribute | (shared captured text) | |
MAX_NAMES |
attribute | (shared captured text) | |
Move |
attribute | ||
NO_BACKUP |
attribute | ||
TEMP_PREFIX |
attribute | (shared captured text) | |
TITLE |
attribute | ||
backup_master |
function | (name: str, masters: Sequence[str]) -> str | None |
Resolve backup layers through the shared App rule. (shared captured text) |
backup_names |
function | (glyphs: Sequence[Any], masters: Sequence[str]) -> list[str] |
Return the sorted unique backup layer names of <code>glyphs</code>. |
clone_shape |
function | (shape: Any) -> Any |
Return a repaired clone of <code>shape</code>. |
contour_copy |
attribute | (shared captured text) | |
contours_in |
function | (layer: Any) -> int |
Return the number of contours in the non-component shapes of <code>layer</code>. |
has_metrics_link |
function | (layer: Any) -> bool |
True when a sidebearing or the width holds a link or an expression. |
masters_api |
attribute | (shared captured text) | |
outline_shapes |
function | (layer: Any) -> list[Any] |
Return the non-component shapes of <code>layer</code> that hold contours. |
plan_anchors |
function | (source: Any, target: Any) -> tuple[tuple[Move, ...], tuple[str, ...], str] |
Return (moves, missing names, problem) for same-named anchors. |
plural |
function | (count: int, word: str) -> str |
Return "1 glyph" or "2 glyphs". (shared captured text) |
qt |
attribute | ||
replace_outline |
function | (source: Any, target: Any) -> None |
Remove the non-component shapes of <code>target</code>; add clones of the source outline. |
restore |
function | (tool: Any, jobs: Sequence[Job], delete: bool, title: str=TITLE) -> dict[str, Any] | None |
Restore the planned jobs as ONE Undo step; optionally delete the backups (the original's <code>restore</code>). |
survey |
function | (package: Any, names: Sequence[str], chosen: str, facts: Any) -> list[Job] |
Plan the restore of backup <code>chosen</code><code> for every glyph in </code><code>names</code>. |