fontlabapp.fontui · declarations 001
anchor_component_studio
anchor_component_studio(font: Any, parent: Any = None) -> Any
Open the shared anchor and component inspection studio for a captured font.
app_shell
app_shell(title: str, preview: str | None = None, tabs: Any = (), parent: Any = None, *, package: Callable[[], Any] | None = None) -> Any
Return an owned studio window shell: preview pane, tabs and status line.
preview is "tglyph", "tmetrics" or None; tabs are
fontlabapp.studios.TabSpec values. show() sizes it to about 80% by
75% of the screen. Writes go through history(label, glyphs, mutate, layers=...).
batch_panel
batch_panel(recipe: Callable[[], Any], parent: Any = None, on_finish: Callable[[list], None] | None = None, python: str | None = None) -> Any
Run recipe() over source UFOs in a child Python; on_finish(results).
The child is python= or, if that is None, $FONTLABAPP_BATCH_PYTHON.
It must be Python 3.11+ with fontlab-fontport installed. With neither
set, Start refuses to run and says so in the panel status.
category_report
category_report(shell: Any, classify: Any) -> Any
Return an owned complete category XML report pane for a captured studio.
cleanup_failed_window
cleanup_failed_window(owner: Any, error: BaseException) -> None
Close failed construction or preserve its owner with both exceptions.
core_pythonqt_lab
core_pythonqt_lab(lab_id, *, profile=None, parent=None, font=None, package=None)
Open one core PythonQt lab with its original named lesson profiles.
current_font
current_font() -> Any
FontLab's current font as a live Fontport font, or None.
designspace_panel
designspace_panel(designspace: Any, parent: Any = None, on_location: Callable[..., object] | None = None) -> Any
Return axis sliders, fields and a source list over a designspace object.
on_location runs when the user changes the location.
duplicate_nodes
duplicate_nodes(mode: str) -> Any
Run one of the original node-duplication policies on the current selection.
features_editor
features_editor(font: Any, parent: Any = None, on_apply: Callable[[Any, str], object] | None = None) -> Any
Return an owned feature-code editor that stages text until Apply.
on_apply(font, text) runs once after each accepted Apply. The text is
never compiled here.
follow_history
follow_history(owner: Any, callback: Callable[[], Any]) -> int
Attach an owned callback to available Undo/Redo actions; Qt loads on use.
font_browser
font_browser(fonts: Any = (), parent: Any = None, on_activate: Callable[..., object] | None = None) -> Any
Return a browser over a borrowed font list.
refresh(fonts) updates the list when fonts open or close elsewhere.
font_info_editor
font_info_editor(font: Any, parent: Any = None, on_apply: _ApplyCallback | None = None) -> Any
Stage font information; on_apply(font, changes) follows a good batch.
The borrowed model needs a callable font.info.apply for editing. Other
models are read-only. Keep the handle and call close() when done.
glyph_browser
glyph_browser(font: Any, parent: Any = None, on_activate: Callable[..., object] | None = None, multiple: bool = False) -> Any
Return an owned glyph browser handle over font.
Keep the handle alive, show handle.widget, call refresh() after
external edits and close() when done. on_activate runs for an
activated glyph; multiple allows a multi-selection.
glyph_preview
glyph_preview(font: Any, name: str | None = None, parent: Any = None) -> Any
Return an owned glyph detail preview; use set_glyph(name), refresh(), close().
glyph_sequence
glyph_sequence(font: Any, parent: Any = None, on_select: Callable[[Any, Any], None] | None = None) -> Any
Show a text or glyph-name sequence; on_select(glyph_or_None, index).
Fontport places the glyphs (Unicode and kerning). The canvas comes from
fontlabapp.fontui.sequence_canvas.
glyph_table
glyph_table(columns: Any, parent: Any = None, layer_column: bool = False) -> Any
Return an owned sortable, filterable glyph list; row_selected(name, layer).
layer_column=True shows each row's layer as the second column.
glyph_view
glyph_view(font: Any, parent: Any = None, *, name: str | None = None, layer: str | None = None, controls: bool = False, read_only: bool = False, label_prefix: str = 'TGlyph', hint_check: Callable[..., Any] | None = None) -> Any
Return an owned TGlyph glyph view (load, refresh, set_overlay, highlight).
groups_editor
groups_editor(font: Any, parent: Any = None, on_apply: _ApplyCallback | None = None) -> Any
Edit explicit groups; on_apply(font, groups) follows one good batch.
hint_tools_window
hint_tools_window(*args: Any, **kwargs: Any) -> Any
Open captured-font PostScript hint tasks in the shared studio shell.
identity_panel
identity_panel(module: str, name: str, parent: Any, *, factory_type: bool = False) -> Any
Build an App-owned task panel without exposing its implementation to studios.
identity_route
identity_route(*args: Any, **kwargs: Any) -> Any
Describe one retained identity/feature task for a studio.
identity_studio
identity_studio(*args: Any, **kwargs: Any) -> Any
Open an identity/feature studio with guarded actions and captured previews.
kerning_editor
kerning_editor(font: Any, parent: Any = None, on_apply: _ApplyCallback | None = None) -> Any
Inspect explicit and effective kerning pairs; edit them in one batch.
on_apply(font, pairs) follows a good batch. Keep the handle and call
close() when done.
kerning_snapshot
kerning_snapshot(package: Any, *, typed: bool = False) -> Any
Read every master's kerning pairs and classes of a live native package.
Returns a KerningSnapshot (masters, pairs, groups) to pass
back as expected= to write_kerning; reading changes nothing. With
typed=True pair sides are (name, "glyphMode" | "groupMode"), so a
group and a glyph of the same name stay distinct; the default keys use the
legacy "@name" strings for groups.
layer_is_hinted
layer_is_hinted(layer: Any) -> Any
Return the HintState of a native layer (PostScript hints, TrueType data, TT hinting).
metrics_preview
metrics_preview(font: Any, parent: Any = None, *, text: str | None = None, controls: bool = False, layer: str | None = None, label_prefix: str = 'TMetrics', hint_check: Callable[..., Any] | None = None, read_only: bool = False) -> Any
Return an owned TMetrics text preview (set_text, set_layer, set_view, highlight_pair).
read_only=True refuses every metric and kerning write (a pure proof preview).
metrics_window
metrics_window(font: Any = None, text: str | None = None, *, parent: Any = None) -> Any
Open the standalone TMetrics window (with its own controls) for font; return it.
outline_generators_backends
outline_generators_backends() -> Any
Return the named outline-generator services used by studio tasks.
outline_studio
outline_studio(title: str, parent: Any = None, **kwargs: Any) -> Any
Open the exact outline task composition for the requested studio.
owned_panel_type
owned_panel_type() -> type
Return the lazy owned-widget base for studio panels and their cleanup.
raise_ascender_tab
raise_ascender_tab(studio: Any, *, backend: Any = None) -> Any
Build the owned ascender task, closing partial construction on failure.
remove_hints
remove_hints(layer: Any, label: str, *, glyph: Any, commit: Callable[..., Any] | None = None) -> Any
Remove the PostScript hints of a native layer as one Undo step named label.
glyph owns layer; commit(label, layers, glyphs, mutate, read_back)
runs the history step (AppShell.history in studios). Returns the
HintState after the write; a layer without PostScript hints is untouched.
show_node_editor
show_node_editor(parent: Any = None) -> Any
Open the captured-font Node Editor with its live coordinate preview.
show_outline_compatibility
show_outline_compatibility(*args: Any, **kwargs: Any) -> Any
Open contour order, node statistics and guarded compatibility tasks.
transform_editor
transform_editor(font: Any, name: str | None = None, parent: Any = None, on_change: Callable[[Any, Any], None] | None = None, on_invalidate: Callable[[], None] | None = None) -> Any
Preview an affine transform of one detached UFO glyph.
on_change(recipe, result) follows each good preview. The source font is
never changed. Keep the handle and call close() when done.
on_invalidate() clears linked proof before subsequent attempts; it is
registered after the initial preview and must not calculate or publish.
write_kerning
write_kerning(package: Any, edits: Any, undo_name: str, *, expected: Any = None) -> bool
Write {master: {pair: value or None}} on any masters as one named Undo step.
Only changed masters are range-checked; the result is read back. Raises
ValueError for an unknown master, pair or out-of-range value and when
expected is stale. Returns False when nothing changes.