fontlabapp.studios.spacing_studio.session
session
Spacing Studio state: native layer reads, base-first plans and one-step writes.
What: Studio keeps the glyph list, the preview master and the last plan.
plan reads each named glyph's explicit layer on the chosen masters
(flGlyph.findLayer; never a glyph-level pen or fgGlyph), skips
missing, auto, metrics-linked and hinted layers with a note, and orders
bases before composites, dropping a composite whose base moves
(model.order_plans). apply writes every pending layer through
AppShell.history as one "Spacing Studio: <action> <subject>" Undo
step on those explicit layers, then reads each layer back.
Why: Contract §1.3/§1.4 and App TODO:37/Scriptmix TODO:74 (no double shift).
Hinted layers stay refused until the user runs "Remove PostScript hints",
the shared Issue 241 remover (fontui.remove_hints), one Undo step per layer.
Used by fontlabapp.studios.spacing_studio.tabs.
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 |
|---|---|---|---|
NO_FONT |
attribute | (shared captured text) | |
NO_GLYPHS |
attribute | (shared captured text) | |
TOLERANCE |
attribute | (shared captured text) | |
X_HEIGHT_FALLBACK |
attribute | ||
edges |
function | (layer: Any) -> tuple[float, float] | None |
The ink's left and right edge of a native layer, or None when it has no outline. |
has_metrics_link |
function | (layer: Any) -> bool |
|
italic_edges |
function | (layer: Any, angle: float, pivot: float) -> tuple[float, float] | None |
De-slanted ink edges: the outline with component transforms, sheared upright around <code>pivot</code>. |
shift_and_set |
function | (layer: Any, plan: Plan) -> None |
Move the layer's outline, components and anchors by <code>plan.dx</code>, then set its advance. |