Skip to content

fontlabapp.studios.spacing_studio.model · declarations 001

Back to fontlabapp.studios.spacing_studio.model

COMPARE_MODES module-attribute

COMPARE_MODES

COPY_MODES module-attribute

COPY_MODES

DEFAULT_STRINGS module-attribute

DEFAULT_STRINGS

EMPTY_NOTE module-attribute

EMPTY_NOTE

EQUALIZE_RULES module-attribute

EQUALIZE_RULES

ITALIC_MODES module-attribute

ITALIC_MODES

LIMIT module-attribute

LIMIT

MEASURES module-attribute

MEASURES

NEGATIVE_NOTE module-attribute

NEGATIVE_NOTE

OFFSET_LIMIT module-attribute

OFFSET_LIMIT

OPERATIONS module-attribute

OPERATIONS

Planner module-attribute

Planner

SYNC_RULES module-attribute

SYNC_RULES

WIDTH_DEFAULT module-attribute

WIDTH_DEFAULT

WIDTH_MODES module-attribute

WIDTH_MODES

centred

centred(before: Metrics, mode: str, value: float) -> Plan | str

Centre In Advance: centre the ink in the kept, set or changed advance.

compared

compared(value: float | None, reference: float | None, mode: str) -> str

Signed difference or percentage of reference; blank when undefined (never substituted).

copied

copied(before: Metrics, reference: tuple[int, int, float], mode: str, offset: int) -> Plan | str

Copy Metrics From Reference: reference is (lsb, rsb, width) of the same master.

equalize

equalize(before: Metrics, rule: str) -> Plan | str

equalized

equalized(lsb: int, rsb: int, rule: str) -> tuple[int, int]

Equalize Sidebearings: both sides from one rule.

italic

italic(before: Metrics, edges: tuple[float, float], mode: str, lsb: float | None, rsb: float | None) -> Plan | str

Italic Sidebearings: change the de-slanted (italic) sidebearings edges describe.

make_plan

make_plan(before: Metrics, lsb: int, rsb: int, width: float | None = None) -> Plan | str

The Plan that gives before the sidebearings lsb/rsb; a note when impossible.

measure

measure(edges: tuple[float, float] | None, width: float) -> Metrics | None

Metrics from ink edges (left, right) and the advance; None when empty.

measure_value

measure_value(metrics: Metrics | None, height: float | None, which: str) -> float | None

One Layer Metric Comparison measurement; None when an empty layer has no such value.

offset_rows

offset_rows(rows: Iterable[tuple[str, Metrics | None]], offset: int) -> list[tuple[str, str, str, str]]

Sidebearing Offset Preview: (name, new LSB, new RSB, advance); the advance never changes.

order_plans

order_plans(entries: Sequence[tuple[str, str, Plan | None, str]], users: Mapping[str, Iterable[str]]) -> list[tuple[str, str, Plan | None, str]]

Bases before composites per master; drop the plan of a composite whose base moves.

entries are (glyph, master, plan or None, note); users maps a base to the glyphs that use it as a component (followed through chains). A composite inherits its base's outline shift, so shifting it too would move that component twice: it is kept unchanged with a note instead.

synced

synced(before: Metrics, reference: Metrics, proportional: bool) -> Plan | str

Sync Sidebearings: the reference master's sidebearings, scaled by ink width when proportional.

tune

tune(before: Metrics, mode: str, lsb: float | None, rsb: float | None) -> Plan | str

Apply tuned to each side given; None keeps that side.

tuned

tuned(current: int, mode: str, value: float) -> int

Sidebearings Tuner: add value, set to it, or scale by value percent.

unit

unit(value: float) -> int

Round half up to a whole font unit, as the Metrics panels do.