Skip to content

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

Back to fontlabapp.studios.anchor_studio.session.Studio

__init__

__init__(shell: Any, *, font: Callable[[], Any] | None = None, selection: Callable[[], list[str]] | None = None, font_names: Callable[[], list[str]] | None = None, metrics: Callable[[Any, str], Any] | None = None, rings: Callable[[Any], list] | None = None) -> None

anchor_rows

anchor_rows(names: Sequence[str] | None = None) -> list[tuple[str, str, str, float, float]]

Every anchor of the glyph list on every master: (glyph, master, anchor, x, y). Reads only.

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 "Anchor Studio: <action> <subject>" step.

bounds_planner

bounds_planner(wanted: Sequence[tuple[str, str, float]]) -> Planner

census

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

Anchor names over the chosen layers with editable/auto layer counts.

centre_planner

centre_planner(anchors: Sequence[str], reference: str, fraction: float, angle: float) -> Planner

choose_master

choose_master(name: str | None) -> None

cloud

cloud(anchor: str, names: Sequence[str] | None = None) -> tuple[dict[str, Any], list[tuple[str, str, float, float]]]

The anchor cloud on every master, as Cloud View drew it per master.

Returns one overlay per master (faint outlines plus a marker per anchor) and every hit as (glyph, master, x, y). Reads only.

delete_planner

delete_planner(anchors: Sequence[str]) -> Planner

duplicates_planner

duplicates_planner(coincident: bool) -> Planner

extraneous_planner

extraneous_planner() -> Planner

font_glyphs

font_glyphs() -> list[str]

Every glyph name of the font, for the "Whole font" scope.

italic_angle

italic_angle() -> float

layer

layer(name: str, master: str) -> Any

The live layer of name on master, or None.

metric

metric(master: str, attribute: str | None) -> int

native_glyph

native_glyph(name: str) -> Any

optical

optical(layer: Any) -> int | str

Optical x of layer within the per-layer time budget, or the reason it failed.

optical_planner

optical_planner() -> Planner

package

package() -> Any

plan

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

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

reload

reload() -> None

Re-read the masters (no writes), then refresh every view.

remove_hints

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

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

rename_planner

rename_planner(find: str, replace: str, regex: bool) -> Planner

rings

rings(name: str, size: int, names: Sequence[str] | None = None) -> tuple[Any, list[tuple[str, str, Pin]]]

Rings around stacked anchors of name and every stacked anchor of the glyph list.

round_planner

round_planner(step: int, do_x: bool, do_y: bool, anchors: Sequence[str]) -> Planner

say

say(text: str) -> None

set_glyphs

set_glyphs(names: Sequence[str]) -> None

shell_status

shell_status() -> str

show_glyph

show_glyph(name: str | None) -> None

Load name on the chosen master in the TGlyph preview (read-only).

snap_planner

snap_planner(anchors: Sequence[str], attribute: str | None, offset: float) -> Planner

targets

targets(all_masters: bool) -> list[str]

use_selection

use_selection() -> list[str]