Skip to content

fontlabapp.studios.layer_manager._empty

_empty

Clean-up tab, Empty layers mode: the Scriptmix "Empty Layers" (Scripts/Cleanup/).

List the extra layers of the selected glyphs that hold no data and no mask content (shown and locked ones are listed as skipped), then delete them with their empty masks. The planning is the original's, verbatim. Delete plans again, refuses a plan that differs from the list, and writes ONE Layer Manager: delete empty layers <subject> Undo step through AppShell.history on the original's carrier layers (the first master layer that stays). The original retains nothing (empty layers hold no components); kept so.

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
DATA_FIELDS attribute
MAX_LISTED attribute
TEMP_PREFIX attribute
TITLE attribute
doomed_layers function (jobs: Sequence[tuple[Any, Any]]) -> list[tuple[Any, Any, str]] Return [(glyph, layer, name)] in removal order: each empty mask, then its layer.
is_empty_auxiliary function (layer: Any, masters: Sequence[str]) -> bool True for an extra layer that holds no data and no mask content.
plan function (package: Any, names: Sequence[str], facts: Any) -> tuple[list[tuple[Any, Any]], list[str]] Return ([(glyph, layer)] to delete, [skip texts]).
plural function (count: int, word: str) -> str Return "1 glyph" or "2 glyphs".
remove function (tool: Any, jobs: Sequence[tuple[Any, Any]], masters: Sequence[str], title: str=TITLE) -> dict | None The original <code>remove</code><code> through </code><code>tool.shell.history</code>: ONE Undo step; None when refused.
skipped_row function (text: str) -> tuple[str, None, tuple[str, str]] A table row for one skipped entry of <code>plan</code>.
undo_layer function (glyph: Any, doomed: set[int], masters: Sequence[str]) -> Any Return the first master layer of <code>glyph</code> that stays.