fontlabapp.plugins.snapshot · declarations 001
Back to fontlabapp.plugins.snapshot
active_glyph
active_glyph(fontlab: Any, *, items: Callable[[Callable[[], Any]], list[Any]] | None = None) -> ActiveGlyph | None
Resolve the active canvas slot against the workspace's current package.
capture
capture(source: NativeSource, *, fontlab: Any = None, items: Callable[[Callable[[], Any]], list[Any]] | None = None, include_zones: bool = False, include_bounds: bool = False, include_components: bool = False, include_background: bool = False, include_masters: bool = False, include_kerning: bool = False, requested: Callable[..., tuple[str, ...]] | None = None, report: Callable[[Exception], object] | None = None) -> GlyphSnapshot
Read one current native layer; inject native adapters in offline tests.
Metrics, components, kerning groups and requested glyphs come from the
master that owns the shown layer (decompose.owner_master). Zones are
read only when that is the current master; another master's zones need a
paint-unsafe master switch. A source with a glyph also yields its
identity and the opted-in data. Identity, components and masters are
cached per glyph revision (_cached; masters may lag until the glyph's
lastModified moves); background and kerning groups, whose edits may
not move it, are read on every paint. requested(identity, groups) names glyphs for others; it is asked
only when identity was read and must not raise. report receives a
failed read once and the field keeps its default; without report the
failure raises.
first_report
first_report(key: tuple[Any, ...]) -> bool
True the first time key is seen since reset(); bounded LRU.
palette_key
palette_key(active: ActiveGlyph | None, *, items: Callable[[Callable[[], Any]], list[Any]] | None = None) -> tuple[Any, ...] | None
Read a cheap revision and node-selection key without a full snapshot.
reset
reset() -> None
Forget cached reads and reported errors; backends call this on close().
resolve_source
resolve_source(info: Any) -> NativeSource | None
Resolve the layer the text slot shows, as active_glyph does.
info.symbol.layerName (a-stub fgSymbol.layerName) names a slot's
layer override; empty means the package's current master (b: active_glyph).
A null or missing symbol also means the master, so one odd slot never
aborts the overlay.
select_contours
select_contours(layer: Any, indices: tuple[int, ...], *, toggle: bool = False, items: Callable[[Callable[[], Any]], list[Any]] | None = None) -> None
Select whole editable contours by index; never change outline geometry.
selected_layers
selected_layers() -> Any
Read the active Font/Glyph window selection through App's checked adapter.