Skip to content

fontlabapp.metrics.zones.model.Editor

Editor dataclass

Keep each master's complete staged table independently of the UI selection.

A failed update cannot alter this editor or any prior editor. A future native writer consumes plan(), checks the raw snapshot plus guideline metadata, and applies every change as one history operation. No native write occurs here.

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
__post_init__ function (self) -> None Parse the full source domain before any edit can be staged.
add function (self, master: str, kind: str) -> 'Editor' Add a 12-unit top at rounded x-height or bottom at zero, named as FontLab does.
origins function (self, master: str) -> tuple[Origin | None, ...] Keep hidden source identity aligned with the exact visible row order.
pending function (self) -> tuple[str, ...] List dirty masters for the original per-master status feedback.
plan function (self) -> tuple[Change, ...] Plan every changed master in source order; no-op tables create no work.
remove function (self, master: str, selection: Iterable[int]) -> 'Editor' Remove all selected display rows once; refuse stale/invalid indices.
rows function (self, master: str) -> tuple[Row, ...] Render one selected master's staged rows in source table order.
snapshot attribute Snapshot (shared captured text)
stage function (self, master: str, rows: Iterable[Iterable[object]], *, origins: Iterable[Origin | None] | None=None) -> 'Ed… Publish a new master table only after every proposed row parses.
staged attribute tuple[tuple[str, Zones], ...]
suggest function (self, master: str, lower: Extent, upper: Extent) -> 'Editor' Replace only the chosen master's stage, preserving every other edit.
zones function (self, master: str) -> Zones Return normalized staging values, keeping the raw snapshot unchanged.