Skip to content

fontlabapp.studios.layer_manager.cleanup

cleanup

Clean-up tab: the Scriptmix "Layer Cleanup" (Scripts/Masters/) and "Empty Layers" (Scripts/Cleanup/).

Mode "Delete ticked" (Layer Cleanup): list the extra layers (masks, backups, alternates, others) of the selected glyphs; nothing is ticked at first; the "Tick" buttons tick every free row of a kind, or none; "Tick row" toggles the chosen row (the shared GlyphTable has no tick boxes, so the "Ticked" column shows the ticks; disclosed). Shown, locked and refused layers are listed as kept and cannot be ticked. "Delete Ticked" plans again and refuses ticks that no longer match ("The layers changed. Check the table and tick again."). Mode "Empty layers" (Empty Layers): list the extra layers that hold no data, then delete them. The planning is the originals', verbatim. Each delete is ONE Layer Manager: ... Undo step through AppShell.history on the originals' carrier layers; the components of deleted layers are retained (fl#7641); layers go by the originals' glyph.removeLayer route.

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
KINDS attribute
MAX_NAMES attribute (shared captured text)
TEMP_PREFIX attribute (shared captured text)
TITLE attribute
associated_master function (name: str, masters: Sequence[str]) -> str | None The App's FontLab layer-to-master rule (the original imported it in <code>kind</code>).
backup_master function (name: str, masters: Sequence[str]) -> str | None Resolve backup layers through the shared App rule. (shared captured text)
delete_layers function (tool: Any, entries: Sequence[Entry], masters: Sequence[str], title: str=TITLE) -> dict | None The original <code>delete&#95;layers</code><code> through </code><code>tool.shell.history</code>: ONE Undo step; None when refused.
kind function (layer: Any, masters: Sequence[str]) -> str | None Return the kind of an extra layer, or None for a layer that is never listed.
masters_api attribute (shared captured text)
plural function (count: int, word: str) -> str Return "1 layer" or "2 layers".
survey function (package: Any, names: Sequence[str], masters: Sequence[str], facts: Any) -> list[Entry] List the extra layers of <code>names</code> in glyph order.
text_widget function (owner: Any, value: str) -> Any
undo_layers function (glyph: Any, doomed: set[int], masters: Sequence[str]) -> list[Any] Return the surviving body layers that carry the Undo step of a deletion.