Skip to content

fontlabapp.studios.spacing_studio.session.Studio · declarations 001

Back to fontlabapp.studios.spacing_studio.session.Studio

__init__

__init__(shell: Any, *, font: Callable[[], Any] | None = None, selection: Callable[[], list[str]] | None = None, users: Callable[[Any], dict[str, set[str]]] | None = None) -> None

apply

apply(action: str, planner: Planner, names: Sequence[str] | None = None, *, all_masters: bool = False, masters: Sequence[str] | None = None, allow_bases: bool = False) -> bool

Plan, then write every changed layer as one "Spacing Studio: <action> <subject>" step.

allow_bases is the "Edit bases of auto glyphs anyway" opt-in; off, a base of an auto glyph is refused.

choose_master

choose_master(name: str | None) -> None

Show name in the preview and make it the master that writes and reads use.

comparison

comparison(which: str, reference: tuple[str, str] | None, mode: str, names: Sequence[str] | None = None, *, all_masters: bool = True) -> list[tuple[str, str, str, str]]

Layer Metric Comparison: (glyph, master, value, against reference); reads only.

italic_defaults

italic_defaults() -> tuple[float, int]

The font's italic angle and half its x-height (the de-slant pivot).

italic_planner staticmethod

italic_planner(angle: float, pivot: float, mode: str, lsb: float | None, rsb: float | None) -> Planner

metrics

metrics(name: str, master: str) -> Metrics | None

names_in

names_in(text: str) -> list[str]

Glyph names in preview text: /name tokens and characters through the font's cmap.

offset_preview

offset_preview(offset: int, names: Sequence[str] | None = None) -> list[tuple[str, str, str, str]]

Sidebearing Offset Preview on the preview master; reads only.

plan

plan(planner: Planner, names: Sequence[str] | None = None, *, all_masters: bool = False, masters: Sequence[str] | None = None) -> list[Row]

Plan planner(name, before, layer, master) for each glyph layer; skipped layers carry a note.

reference_planner

reference_planner(reference: str, mode: str, offset: int) -> Planner

Copy Metrics From Reference: each master copies the reference glyph's layer of that master.

reload

reload(*, preserve: bool = False) -> None

Read the captured font; preserving refresh never retargets controls.

remove_hints

remove_hints(names: Sequence[str] | None = None, *, all_masters: bool = False) -> int

Remove PostScript hints from the chosen layers: one "Spacing Studio: remove hints <glyph>" step each.

string_rows

string_rows(text: str) -> list[tuple[str, str, str, str]]

Spacing String Preview numbers: (glyph, LSB, RSB, advance) on the preview master; reads only.

sync_planner

sync_planner(reference_master: str, proportional: bool) -> Planner

Sync Sidebearings: each layer follows its glyph's layer in reference_master.

sync_targets

sync_targets(reference_master: str, all_masters: bool) -> list[str]

use_selection

use_selection() -> list[str]

Take the Font window selection (else the current glyph) as the glyph list.