Skip to content

fontlabapp.studios.layer_manager._empty · declarations 001

Back to fontlabapp.studios.layer_manager._empty

DATA_FIELDS module-attribute

DATA_FIELDS

MAX_LISTED module-attribute

MAX_LISTED

TEMP_PREFIX module-attribute

TEMP_PREFIX

TITLE module-attribute

TITLE

doomed_layers

doomed_layers(jobs: Sequence[tuple[Any, Any]]) -> list[tuple[Any, Any, str]]

Return [(glyph, layer, name)] in removal order: each empty mask, then its layer.

Names are read now, before the layers go.

is_empty_auxiliary

is_empty_auxiliary(layer: Any, masters: Sequence[str]) -> bool

True for an extra layer that holds no data and no mask content.

plan

plan(package: Any, names: Sequence[str], facts: Any) -> tuple[list[tuple[Any, Any]], list[str]]

Return ([(glyph, layer)] to delete, [skip texts]). Change nothing.

plural

plural(count: int, word: str) -> str

Return "1 glyph" or "2 glyphs".

remove

remove(tool: Any, jobs: Sequence[tuple[Any, Any]], masters: Sequence[str], title: str = TITLE) -> dict | None

The original remove through tool.shell.history: ONE Undo step; None when refused.

skipped_row

skipped_row(text: str) -> tuple[str, None, tuple[str, str]]

A table row for one skipped entry of plan.

plan writes "glyph/layer: reason" for a kept layer and "glyph: reason" for a refused glyph (no layer); both, and any other text, give a row.

undo_layer

undo_layer(glyph: Any, doomed: set[int], masters: Sequence[str]) -> Any

Return the first master layer of glyph that stays.

FontLab records an Undo step only for a list of layers plus their glyph; a glyph alone adds no step. doomed holds layer ids. Raise ValueError when no master layer is left.