fontlabapp.core.scripting · declarations 003
Back to fontlabapp.core.scripting
names_font_window_selection
names_font_window_selection(*, expected_fg_id: int | None = None, deadline: float | None = None) -> list[str]
Read complete native font-order selection, with optional carrier fencing.
Existing zero-argument callers keep their original behavior. Bound callers require FL.fl.font.id to equal flPackage.fgId; the official fgFont.id binding returns owner.getPackageID (pyfontgate/fgfont.cxx). No fgPackage is read. One absolute monotonic deadline covers the whole-font scan. Native calls cannot be interrupted here; the next checkpoint diagnoses an overrun.
names_legacy_font
names_legacy_font() -> list[str]
Glyph names of the legacy FL.fl.font in its index order; [] with no font.
The order the three Font Info glyph_records copies iterate; read only
names, never flGlyph.fgGlyph. Used by fontlabapp.studios._records.
names_muted
names_muted(widget: Any) -> str
Resolve theme-derived secondary colour for Names controls.
names_selected_names
names_selected_names() -> list[str]
Read Font window selection, otherwise the non-None current glyph.
Native glyph truthiness counts contours, so empty and component-only glyphs remain valid fallbacks. Native read failures propagate to the guarded panel.
names_snapshot_refresh
names_snapshot_refresh(method: Any) -> Any
Wrap a Names scan with complete-refresh publication.
node_coordinates_api
node_coordinates_api() -> Any
Load selected-node measurements without importing Qt or FontLab eagerly.
point_counts_dialog_type
point_counts_dialog_type() -> type[Any]
Load the owned Point Counter snapshot panel only when its menu runs.
proof_api
proof_api() -> Any
Load shared advance-only parsing, outlines and word filters (App0.2.10).
proof_dialog_type
proof_dialog_type() -> type[Any]
Load the owned native Proof panel shell only when a script needs it.
proof_snapshot_refresh
proof_snapshot_refresh(method: Any) -> Any
Bind complete Proof results and clear failed or stale scans.
proof_studio_backends
proof_studio_backends() -> Any
Load the backends Proof Studio part 2 reuses, as one namespace of modules.
random (seven random proofs), text_tab (one new text tab),
text_filter/text_filter_settings (Text Filter), catalog (glyph
catalogue for coverage) and master_text with capture, model,
proof, settings and owners (Master Text Comparison). Nothing
native loads until a backend function runs.
proof_view_types
proof_view_types() -> Any
Load the three actual outline painters lazily inside FontLab.
read_feature_blocks
read_feature_blocks(package: Any) -> dict
Read exact VFJ feature source; see fontui.feature_blocks.
review_action
review_action(method: Any) -> Any
Refuse stale review selections using the existing owned action boundary.
review_dialog_type
review_dialog_type() -> type[Any]
Reuse the guarded owned lifecycle for two complete read-only reviews.
review_snapshot_refresh
review_snapshot_refresh(method: Any) -> Any
Validate cached source before a complete review or intended option change.
revision_compare_api
revision_compare_api() -> Any
Load exact named-field comparison without eager native imports.
revision_compare_dialog_type
revision_compare_dialog_type() -> type[Any]
Load explicit open-font comparison controls when their menu is invoked.
select_glyphs
select_glyphs(names: Iterable[str], *, package_id: int, add: bool = False) -> list[str]
Select exactly the requested names in the matching current Font window.
The optional add flag selects only missing names without clearing selection.
Validate every requested name before any write; stale or missing fonts and
unknown names raise ValueError. Return actual selected names in font order.
Activate the regular Font window before selecting. A Glyph window may leave
readable font/selection data while legacy selection writers would crash.
Native errors propagate to the caller's guarded UI slot. Completed additions
remain selected if a later addition fails; the prior selection is not cleared.
Replacement mode still clears first. Call no refresh:
FL.fl.Unselect/Select repaint their cells, and UpdateAll()
queued glyph ids (FontLab 9.0.9790, issue 122 M1; FontLab issue 8537).
show_script_dialog
show_script_dialog(dialog_type: Callable[[Any], Any], key: str) -> Any
Replace only a safely closed owner; retain and raise a diagnosed refusal.
An old dialog whose native widget is already destroyed counts as gone.
spacing_offset_backends
spacing_offset_backends() -> Any
Reuse the captured selected-layer offset preview without exposing studio internals.
tabular_width_dialog_type
tabular_width_dialog_type() -> type[Any]
Load the read-only tabular-width report inside FontLab, on demand.
unreferenced_api
unreferenced_api() -> Any
Load original glyph-reference calculations without importing native Qt.
vertical_metrics_backends
vertical_metrics_backends() -> Any
Load the backends the Vertical Metrics & Zones app reuses, as one namespace.
master_metrics (route-A master metric writer), font_history
(require_font_window), zones/zone_rows/zone_data/
zone_editor/zone_native (the Alignment Zones model, rows, editor
dialog and route-A writer), extent (outline vertical extent),
angles (Italic Angle capture and apply), reporter (the Vertical
Metrics Reporter capture and render) and panel (muted). Nothing
native loads until a backend function runs. Used by
fontlabapp.studios.vertical_metrics.
vertical_metrics_dialog_type
vertical_metrics_dialog_type() -> type[Any]
Load the all-master stored vertical-metrics report only on invocation.
vertical_metrics_views
vertical_metrics_views() -> Any
Return the Qt module with the Italic Angle Gauge (masters.angles.views).
Separate from vertical_metrics_backends because it loads PythonQt.
Used by the Italic angle tab of fontlabapp.studios.vertical_metrics.
write_feature_blocks
write_feature_blocks(package: Any, expected: dict, updated: dict, *, references: Iterable[str], undo_name: str) -> dict[str, int]
Write guarded VFJ feature source; see fontui.feature_blocks.
write_font_info
write_font_info(package: Any, changes: Iterable[tuple[str | None, str, Any, Any]], *, undo_name: str) -> dict[str, int]
Apply an explicit Font Info plan after checking every old value and master.
This bounded helper supports the six script-menu Font Info tools. It uses Fontport's measured package plus masters-container history protocol; that protocol may expose an additional no-op Undo checkpoint. Native Undo and persistence acceptance remains the caller's responsibility. No glyph/layer is notified. A setter failure rolls back every attempted field, including a setter that wrote before raising. Rollback failure is reported explicitly.