Skip to content

fontlabapp.kerning.edit.model

model

Plan the five menu editors without native writes or optional dependencies.

Native @class notation and explicit zero presence are retained. Scale/copy/snap round halves away from zero; the original Pair Editor rounds typed cells with Python's integer round. Writers validate every resulting whole-unit value.

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
Cell attribute
Changes attribute
Edits attribute
MAX_VALUE attribute
MIN_VALUE attribute
Pair attribute (shared captured text)
Pairs attribute
class_sides function (package: Any, master: str, glyph: str) -> tuple[str | None, str | None] Return the original first side-specific class for the selected glyph.
copy_plan function (source: Mapping[Pair, float], target: Mapping[Pair, float], mode: str, percent: float) -> dict[Pair, int | N… Stage replace, missing-only or matching-only edits without conflating zero/absence.
copy_run function (package: Any, source_master: str, targets: list[str], mode: str, percent: float, *, expected: Any=None, undo… Build every target before the one multi-master native write; return preview counts.
involving function (package: Any, masters: list[str], glyph: str) -> dict[Pair, dict[str, float]] Collect explicit pairs involving the glyph or either original first-side class.
native_side function (name: str) -> tuple[str, bool] Retain original scripts' boolean explicit-key conversion interface.
parse_cell function (text: str) -> int | None Parse blank as deletion and retain the original typed-cell integer rounding.
partner_exists function (package: Any, masters: list[str], pair: Pair) -> bool Allow a new pair row if at least one master has its side-compatible names.
plan_values function (pairs: Mapping[str, Pairs], parameter: float, drop_zero: bool, *, snap: bool) -> Changes Round (<code>snap</code><code>) or scale already-read </code><code>{master: pairs}</code>, e.g. a kerning snapshot's pairs.
remove_run function (package: Any, masters: list[str], threshold: float, *, expected: Any=None, undo_name: str) -> dict[str, int] Stage every small-pair deletion before one shared native write.
round_plan function (package: Any, masters: list[str], step: int, drop_zero: bool) -> Changes Preview snapping, including existing zero deletion when requested.
round_to function (value: float, step: float) -> int Snap to a positive whole-unit step, with halves away from zero.
scale_plan function (package: Any, masters: list[str], percent: float, drop_zero: bool) -> Changes Preview scaling with the original explicit-zero option semantics.
scaled function (value: float, percent: float) -> int Multiply by percent, with exact original halves-away rounding and bounds.
small_pairs function (package: Any, masters: list[str], threshold: float) -> dict[str, list[tuple[str, str, float]]] List strictly smaller magnitudes, ordered by magnitude then pair names.
small_values function (pairs: Mapping[str, Pairs], threshold: float) -> dict[str, list[tuple[str, str, float]]] <code>small&#95;pairs</code><code> over already-read </code><code>{master: pairs}</code> (a kerning snapshot's pairs).
stage_cell function (staged: dict[Cell, int | None], errors: dict[Cell, str], key: Cell, text: str, old: float | None) -> bool Clear only the invalid cell's prior edit; preserve every other valid staged cell.
summary function (target: Mapping[Pair, float], edits: Mapping[Pair, int | None]) -> tuple[int, int, int] Count added/changed/deleted explicit pairs in one target's preview.
whole_value function (value: float) -> int Require finite signed32 whole units, including exact native history values.
write_kerning function (package: Any, edits: Edits, undo_name: str) -> bool Provide the original programmatic writer interface through the safe batch.