fontlabapp.studios.layer_manager.cleanup · declarations 001
Back to fontlabapp.studios.layer_manager.cleanup
KEY
module-attribute
KEY
KINDS
module-attribute
KINDS
TITLE
module-attribute
TITLE
associated_master
associated_master(name: str, masters: Sequence[str]) -> str | None
The App's FontLab layer-to-master rule (the original imported it in kind).
delete_layers
delete_layers(tool: Any, entries: Sequence[Entry], masters: Sequence[str], title: str = TITLE) -> dict | None
The original delete_layers through tool.shell.history: ONE Undo step; None when refused.
kind
kind(layer: Any, masters: Sequence[str]) -> str | None
Return the kind of an extra layer, or None for a layer that is never listed.
plural
plural(count: int, word: str) -> str
Return "1 layer" or "2 layers".
survey
survey(package: Any, names: Sequence[str], masters: Sequence[str], facts: Any) -> list[Entry]
List the extra layers of names in glyph order. Change nothing.
Notes, in this order: a glyph the geometry policy refuses, a locked layer, the shown layer.
text_widget
text_widget(owner: Any, value: str) -> Any
undo_layers
undo_layers(glyph: Any, doomed: set[int], masters: Sequence[str]) -> list[Any]
Return the surviving body layers that carry the Undo step of a deletion.
FontLab records an Undo step only for a list of layers plus their glyph;
a glyph alone adds no step. Take the body layer of each deleted mask;
else the first master layer that stays. doomed holds layer ids.
Raise ValueError when no such layer is left.