fontlabapp.kerning.batch · declarations 001
Back to fontlabapp.kerning.batch
ensure_snapshot
ensure_snapshot(package: Any, expected: KerningSnapshot) -> KerningSnapshot
Reject any pair/class/master change since the displayed complete scan.
snapshot_kerning
snapshot_kerning(package: Any, *, typed: bool = False) -> KerningSnapshot
Read every named master without changing the active master; refuse stale fonts.
validate_pair
validate_pair(package: Any, master: str, pair: Pair, *, groups: Mapping | None = None, members: bool = True) -> tuple
Require existing glyphs or classes of the correct side/mode before any write.
members=False checks only the class identity; it is used for pairs the
batch merely re-seeds, so a stale class member elsewhere in the font (common
in subset fonts) does not block unrelated edits.
write_kerning
write_kerning(package: Any, edits: Edits, undo_name: str, *, expected: KerningSnapshot | None = None) -> bool
Apply one fully staged batch; no-op adds no history, partial failures retain Undo.
Fractional source history on any master is refused because the package-wide native checkpoint rounds it. All validation and native container acquisition precede notification. Every final master must also fit the native save/reopen range of +/-2*positive finite UPM; no values are silently clamped. Failed writes/readback honestly report possible partial mutation rather than pretending that a manual rollback was an Undo.