Skip to content

fontlabapp.studios.component_studio.locks

locks

Locks tab (Unlock Lock): show which components are locked; lock or unlock them.

The original's rules are kept unchanged (data_tool, element_name, explicit_locks, lock_states, word, lock_changes, LockEditor): FontLab's Python property reports every component as locked, so each element's own lock flag is read from FontLab's glyph data (get_glyph, the data a .vfj file stores) and trusted only when its elements match the layer's shapes one to one with the same component names; otherwise the state is "unknown, kept". The listing (Reload selection and every dry run) only reads: no history, no write. "Action": Lock (default) or Unlock; "Masters": current master (default) or all. Apply reads the stored flags again, sets contentLocked on each listed component in place as one Component Studio: lock components <subject> (or unlock components) Undo step, then reads the flags back. 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 original). The original's from fly import pr is the module-level pr below (FontLab's in-process data tools through core.scripting.component_studio_backends).

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
Entries attribute
component_writer attribute (shared captured text)
data_tool function (tool: str, **arguments: Any) -> Any Call one of FontLab's own data tools in-process (fly.pr is native fontpr).
element_name function (element: Any) -> str Base glyph name of a component element, '' for any other element.
explicit_locks function (package: Any, name: str) -> dict[str, Entries] {layer name: element entries} from FontLab's stored glyph data.
lock_changes function (glyph: Any, layer: Any, entries: Entries | None, locked: bool) -> list[component_writer.Change] One row per component: state now and after the action.
lock_states function (layer: Any, entries: Entries | None) -> list[bool | None] Own lock flag per layer shape; all None when data and shapes differ.
pr attribute (shared captured text)
word function (state: bool | None) -> str 'locked', 'unlocked' or 'unknown'.