Skip to content

fontlabapp.kerning.edit.model · declarations 001

Back to fontlabapp.kerning.edit.model

Cell module-attribute

Cell

Changes module-attribute

Changes

Edits module-attribute

Edits

MAX_VALUE

MAX_VALUE

MIN_VALUE

MIN_VALUE

Pairs module-attribute

Pairs

class_sides

class_sides(package: Any, master: str, glyph: str) -> tuple[str | None, str | None]

Return the original first side-specific class for the selected glyph.

copy_plan

copy_plan(source: Mapping[Pair, float], target: Mapping[Pair, float], mode: str, percent: float) -> dict[Pair, int | None]

Stage replace, missing-only or matching-only edits without conflating zero/absence.

copy_run

copy_run(package: Any, source_master: str, targets: list[str], mode: str, percent: float, *, expected: Any = None, undo_name: str) -> dict[str, tuple[int, int, int]]

Build every target before the one multi-master native write; return preview counts.

involving

involving(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

native_side(name: str) -> tuple[str, bool]

Retain original scripts' boolean explicit-key conversion interface.

parse_cell

parse_cell(text: str) -> int | None

Parse blank as deletion and retain the original typed-cell integer rounding.

partner_exists

partner_exists(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

plan_values(pairs: Mapping[str, Pairs], parameter: float, drop_zero: bool, *, snap: bool) -> Changes

Round (snap) or scale already-read {master: pairs}, e.g. a kerning snapshot's pairs.

The same rule as round_plan/scale_plan; used by Kerning Batch so Apply writes exactly the plan built from the snapshot it shows.

remove_run

remove_run(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

round_plan(package: Any, masters: list[str], step: int, drop_zero: bool) -> Changes

Preview snapping, including existing zero deletion when requested.

round_to

round_to(value: float, step: float) -> int

Snap to a positive whole-unit step, with halves away from zero.

scale_plan

scale_plan(package: Any, masters: list[str], percent: float, drop_zero: bool) -> Changes

Preview scaling with the original explicit-zero option semantics.

scaled

scaled(value: float, percent: float) -> int

Multiply by percent, with exact original halves-away rounding and bounds.

small_pairs

small_pairs(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

small_values(pairs: Mapping[str, Pairs], threshold: float) -> dict[str, list[tuple[str, str, float]]]

small_pairs over already-read {master: pairs} (a kerning snapshot's pairs).

stage_cell

stage_cell(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

summary(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

whole_value(value: float) -> int

Require finite signed32 whole units, including exact native history values.

write_kerning

write_kerning(package: Any, edits: Edits, undo_name: str) -> bool

Provide the original programmatic writer interface through the safe batch.