Skip to content

fontlabapp.fontui.kerning · declarations 001

Back to fontlabapp.fontui.kerning

EMPTY_PAIR_TEXT module-attribute

EMPTY_PAIR_TEXT

apply_kerning

apply_kerning(font: Any, action: str, pair: tuple[str, str], value: float | None, *, undo_name: str, pairs: Any = None, before: dict | None = None, master: str | None = None) -> dict | None

Stage action on pair with Fontport, apply it once, verify readback.

Return the applied values, or None when the staged kerning equals the current kerning (nothing is written). Raise TypeError for a model without kerning.apply and RuntimeError when the backend reads back different values. Shared by KerningEditor.edit and fontlabapp.fontui.tmetrics.

Fontport writes kerning to the default master only (its set_kerning has no master argument). master names the master the caller resolved; when it is not the default master (font.defaultLayerName) the write is refused with ValueError before anything changes. None keeps the old behaviour: the default kerning target.

number_text

number_text(value: float) -> str

Show integral values without a fraction; native Undo can restore -0.0.