Skip to content

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

Back to fontlabapp.studios.proof_studio.session.Studio

__init__

__init__(shell: Any, *, font: Callable[[], Any] | None = None, selection: Callable[[], tuple[str, ...]] | None = None, facts: Callable[[], Facts | None] | None = None, settings: Callable[[str, str], Any] | None = None, package: Callable[[], Any] | None = None) -> None

copy

copy(proof: Proof | None, part: int, clipboard: Callable[[str], Any]) -> str | None

Put the exact text of part on clipboard; return it (None when nothing to copy).

generate

generate(generator: Generator, choice: str, *, seed: int | None = None, values: dict[str, Any] | None = None) -> Proof | None

The proof for choice; None (with the reason in the status line) on failure.

load

load(generator: Generator, settings: Any) -> Outcome | None

The generator's saved values (None, with the reason in the status line, on failure).

open

open(generator: Generator, choice: str, context: Context | None = None) -> bool

Open the new FontLab Glyph tab(s); True on success.

With open_current and a context the shown proof is opened; otherwise open(choice) repeats the absorbed script.

paint

paint(generator: Generator, choice: str, view: Any, proof: Proof | None) -> str | None

Draw proof.canvas in the absorbed panel's own stacked view; return the status.

The status joins the proof note and the original panel's status line (width, sizes or rows, missing glyphs). None when there is nothing to draw or the draw failed (reason in the status line).

run

run(generator: Generator, action: Action, context: Context) -> Outcome | None

Run a generator action; its status goes to the status line (None on failure).

save

save(generator: Generator, settings: Any, values: dict[str, Any], proof: Proof) -> bool

Save the generator's values after a user edit; False (status) when the save fails.

show

show(proof: Proof | None, part: int = 0) -> str

Preview part of proof in TMetrics with its size, layer and kerning; return the text.