Skip to content

fontlabapp.metrics.zones.model.Editor · declarations 001

Back to fontlabapp.metrics.zones.model.Editor

__post_init__

__post_init__() -> None

Parse the full source domain before any edit can be staged.

add

add(master: str, kind: str) -> Editor

Add a 12-unit top at rounded x-height or bottom at zero, named as FontLab does.

The name is "T: <position>" or "B: <position>", plus .1, .2 … when that kind already has it (flZone::guaranteeName and _check_zone_name, flpackage.cpp:1646,12035-12075). So a native write keeps the name, and the read-back can match the row.

origins

origins(master: str) -> tuple[Origin | None, ...]

Keep hidden source identity aligned with the exact visible row order.

pending

pending() -> tuple[str, ...]

List dirty masters for the original per-master status feedback.

plan

plan() -> tuple[Change, ...]

Plan every changed master in source order; no-op tables create no work.

remove

remove(master: str, selection: Iterable[int]) -> Editor

Remove all selected display rows once; refuse stale/invalid indices.

rows

rows(master: str) -> tuple[Row, ...]

Render one selected master's staged rows in source table order.

stage

stage(master: str, rows: Iterable[Iterable[object]], *, origins: Iterable[Origin | None] | None = None) -> Editor

Publish a new master table only after every proposed row parses.

staged class-attribute instance-attribute

staged: tuple[tuple[str, Zones], ...]

suggest

suggest(master: str, lower: Extent, upper: Extent) -> Editor

Replace only the chosen master's stage, preserving every other edit.

zones

zones(master: str) -> Zones

Return normalized staging values, keeping the raw snapshot unchanged.