Skip to content

fontlabapp.studios.component_studio._shared

_shared

Component Studio shared pieces: reused backends, the planned-layer tab and one labelled Apply.

The originals' panels (components.panel ComponentPanel) planned with components.writer.collect over explicit layers and wrote with components.writer.apply_work. Their plans, refusals and texts are kept. Only the write moves: prepare before history, write plus settle inside AppShell.history (with the removed components retained, fl#7641), the original editor's read-back after it, as one Component Studio: <action> <subject> Undo step over exactly the planned layers. Apply plans again from live data and refuses when the plan differs from the one on screen. As in the originals, a glyph that owns auto layers or is a base of one is refused outright (no opt-in: no original has one).

Classes

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
APP attribute (shared captured text)
MAX_ROWS attribute (shared captured text)
SHOWN_NAMES attribute (shared captured text)
STALE attribute
backends function () -> Any <code>core.scripting.component&#95;studio&#95;backends()</code> (tests replace it).
find_glyphs function (package: Any, names: Iterable[str]) -> list[Any] The existing glyphs of <code>names</code><code> in </code><code>package</code>, in order (the originals' scan).
fingerprint function (plan: Any) -> tuple What the table shows and what Apply writes, comparable between two plans.
label function (action: str, names: Iterable[str]) -> str <code>Component Studio: &lt;action&gt; &lt;subject&gt;</code>.
plural function (count: int, word: str) -> str
subject function (names: Iterable[str]) -> str Undo-label subject: the glyph name, or <code>&quot;N glyphs&quot;</code> for several. (shared captured text)
write function (tool: Tool, title: str, work: list, editor: Any) -> dict | None Write <code>work</code><code> with </code><code>editor</code><code> as ONE </code><code>tool.shell.history</code><code> step titled </code><code>title</code>.