fontlabapp.studios.component_studio.locations
locations
Locations tab (Set Component Locations): set or reset component source locations.
The original's rules are kept unchanged (encode_location,
component_targets, location_plan, current_coordinates,
LocationEditor): give components a font-axis location such as
#wt=650,wd=100, or Reset each base layer name to the host master layer
(as Reset to current layer does). Each component/master occurrence gets one
row of the per-axis table, starting at its current location; Set writes
only edited rows and keeps an existing @node suffix. "Action": Set
location (default) or Reset to current layer; "Components": Selected
components or All components in selected glyphs (default); "Source": an
optional exact source name; "Masters": all masters (default). Automatic
layers, their owners and bases, locked layers, shared element data and
missing sources are listed as kept; other eligible occurrences still write.
Set refuses unknown axes and non-finite or out-of-range coordinates; Set
without edits writes nothing. Apply writes componentLayer in place as
one Component Studio: set component locations <subject> (or reset
component locations) Undo step, then reads it back. From a Glyph window,
Apply refuses an edit that includes glyphs the window does not show
(AppShell.history's Glyph-window guard, the original's refusal).
Credit: independent behaviour rewrite after Fernando Díaz, Reset Type Studio, Glyphs-Scripts (Apache-2.0). No source code was copied.
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 |
|---|---|---|---|
RowKey |
attribute | ||
component_targets |
function | (glyph: Any, layer: Any, selected_only: bool) -> list[tuple[Any, str]] |
Resolve selection by position and base name; never substitute a sibling. |
current_coordinates |
function | (package: Any, shape: Any, master: str) -> dict[str, float] |
Read a component's explicit coordinates or named source-layer position. |
encode_location |
function | (package: Any, values: dict[str, float]) -> str |
Encode native # syntax in declared-axis order, within design bounds. |
location_plan |
function | (package: Any, glyphs: list[Any], masters: list[str], values: dict[str, dict[str, float]], facts: history.Aut… |
Preview each eligible edit or kept occurrence; a refusal stays local. |
writer |
attribute |