fontlabapp.studios.mark_attachment._shared
_shared
Mark Attachment shared pieces: reused backends, the dry run, one labelled Apply and the planned-layer tab base.
The originals' plans (components.writer / anchors.writer collect
over explicit layers) are kept. Their apply step is replaced by
AppShell.history over exactly the planned layers: prepare before
history, write inside it and the original read-back after it, one
Mark Attachment: <action> <subject> Undo step. Auto layers are skipped,
and, as in the originals, a glyph that owns auto layers or is a base of
one is refused outright (blocked_rows and require_safe).
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) | |
COLUMNS |
attribute | ||
MAX_ROWS |
attribute | (shared captured text) | |
ROUNDING_NOTE |
attribute | (shared captured text) | |
SHOWN_NAMES |
attribute | (shared captured text) | |
STALE |
attribute | ||
apply |
function | (tool: Tool, action: str, dry: Dry, replan: Callable[[], Dry | None], edit: Any) -> bool |
Write exactly the edits of <code>dry</code><code> as one named Undo step through </code><code>tool.shell.history</code>. |
backends |
function | () -> Any |
<code>core.scripting.mark_attachment_backends()</code> (tests replace it). |
dry_run |
function | (writer: Any, package: Any, glyphs: list[Any], masters: list[str], planner: Callable[..., Any]) -> Dry |
Plan once with <code>writer.collect</code> (the original's plan) and decide whether Apply may run. |
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. (shared captured text) |
label |
function | (action: str, names: Iterable[str]) -> str |
<code>Mark Attachment: <action> <subject></code>. |
plural |
function | (count: int, word: str) -> str |
(shared captured text) |
subject |
function | (names: Iterable[str]) -> str |
Undo-label subject: the glyph name, or <code>"N glyphs"</code> for several. (shared captured text) |