fontlabapp.studios.component_studio.decompose
decompose
Decompose tab (Decompose, Decompose Named Components, Decompose Serif Components).
The three originals become the three "Components" scopes of one tab; each scope keeps its original's planner, editor, master default and texts:
- All components (Decompose,
decompose_changes): every component of the selected glyphs becomes the parts of its base glyph, one level per press (" (nested: press again)"); a base that cannot be copied is a red row and refuses the batch. Masters default: current master. - Named component (Decompose Named Components,
make_plan): only components whose source is the exact name typed; the whole subtree is flattened into independent outlines. Refused glyphs, missing, automatic, locked or service layers and copy problems are listed as "kept: ..." rows and do not block the other rows. Copies are made on Apply, before history. Masters default: all masters. - Serif components (Decompose Serif Components,
changes): only components whose base name starts with "Serif". Masters default: current master.
New contours are unlocked (EjectEditor(unlock=True)). Auto layers are
listed and kept; a glyph that owns auto layers or is a base of one is
refused (no opt-in, as in the originals). Apply writes the listed
decomposition as one Component Studio: decompose ... <subject> Undo
step and hands FontLab each removed component with its data and builder
(retain); Edit > Undo of removed components depends on FontLab
(fl#7641, qualified natively in T29).
Credits: Decompose Named Components is an independent behaviour rewrite after Fernando Díaz & Reset Type Studio, Glyphs-Scripts (Apache-2.0); Decompose Serif Components after Pedro Arilla, 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 |
|---|---|---|---|
SCOPES |
attribute | ||
SCOPE_SETTINGS |
attribute | ||
changes |
function | (package: Any, glyph: Any, master: str, layer: Any) -> list[writer.Change] |
Describe only Serif-prefixed components; block unsafe base copies. |
checked_parts |
function | (package: Any, shape: Any, master: str) -> list[Any] |
Refuse detached copy loss before history can remove the occurrence. |
component_writer |
attribute | (shared captured text) | |
decompose_changes |
function | (package: Any, glyph: Any, layer: Any, master: str) -> list[component_writer.Change] |
One row per component of the layer: its base and what it becomes. |
flatten_parts |
function | (shape: Any, depth: int=0) -> list[Any] |
Copy one subtree into detached outlines, in drawing order. |
make_plan |
function | (package: Any, glyphs: list[Any], masters: list[str], name: str, facts: history.AutoFacts, *, copy: bool=Fals… |
Read counts for preview; copy only on Apply, before history opens. |
source_contours |
function | (package: Any, shape: Any, master: str, depth: int=0) -> int |
Count expected contours from source layers, independently of copy caches. |
writer |
attribute |