fontlabapp.studios.layer_manager._use_master
_use_master
Backups tab, Use as master mode: the Scriptmix "Use Layer As Master" (Scripts/Masters/).
Swap the roles of a chosen layer and the master layer it belongs to by
renaming only: the old master layer becomes "mask_name_for,
plan_swap, _mask_of) are the original's, verbatim, and every
original refusal is kept. Host-mode deviation (disclosed): the original
promoted the layer selected in a Glyph window; here the tab lists the
selected glyphs' layers that belong to a master but are not its master
layer, and the "Layer" choice names the layer to promote. Use as master
writes all renames as ONE Layer Manager: use as master <subject> Undo
step through AppShell.history (names put back on failure, as the
original did).
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 |
|---|---|---|---|
DEADLINE_SECONDS |
attribute | (shared captured text) | |
STAMP_FORMAT |
attribute | (shared captured text) | |
TITLE |
attribute | ||
apply_renames |
function | (tool: Any, jobs: Sequence[dict[str, Any]], title: str=TITLE) -> dict[str, Any] | None |
Rename all planned layers in ONE Undo step; restore the names on failure (the original's). |
candidates |
function | (glyphs: Sequence[Any], masters: Sequence[str]) -> list[str] |
Sorted names of the body layers that belong to a master but are not its master layer. |
mask_name_for |
function | (layer_name: str, masters: Sequence[str]) -> str |
Return the mask layer name FontLab expects for a body layer name. |
masters_api |
attribute | (shared captured text) | |
plan_layers |
function | (package: Any, names: Sequence[str], layer_name: str, stamp: str) -> list[dict[str, Any]] |
The original <code>plan()</code><code> for layer </code><code>layer_name</code><code> of each glyph in </code><code>names</code> that has it. |
plan_swap |
function | (master: str, chosen: str, taken: Collection[str], stamp: str, masters: Sequence[str], masks: tuple[bool, boo… |
Return renames [(role, old name, new name)] in a safe order. |