Skip to content

fontlabapp.fontui

fontui

Qt controls for FontLab objects and FontParts-style fonts. Qt loads only at construction.

What it holds: the general browsers, previews, features editor and Designspace panel, the Qt lifetime base (lifecycle), the pure models, the sequence canvas, and the editors for FontParts-style fonts: font info, groups, kerning, transform, batch and glyph sequence. fontlabapp.fontui.feature_blocks reads and writes exact VFJ feature source through Fontport.

Lazy by design: this module imports no editor module and no PythonQt. A factory imports its module only when you call it, which keeps the FontLab 5 s cold-import limit.

Fontport: the FontParts editors validate and apply data with fontlab_fontport. That package depends on this one, so it is an optional extra: pip install "fontlab-fontlabapp[fontport]". Without it, calling one of those factories raises ImportError that names the extra. Everything else here works without Fontport.

Moved back (issue 201): fontlab_fontport.ui held these editors for one release. Fontport now has no UI; its ui package only raises ImportError. old: from fontlab_fontport.ui import kerning_editor new: from fly.ap.fontui import kerning_editor

Modules

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
anchor_component_studio function (font: Any, parent: Any=None) -> Any Open the shared anchor and component inspection studio for a captured font.
app_shell function (title: str, preview: str | None=None, tabs: Any=(), parent: Any=None, *, package: Callable[[], Any] | None=N… Return an owned studio window shell: preview pane, tabs and status line.
batch_panel function (recipe: Callable[[], Any], parent: Any=None, on_finish: Callable[[list], None] | None=None, python: str | No… Run <code>recipe()</code><code> over source UFOs in a child Python; </code><code>on&#95;finish(results)</code>.
category_report function (shell: Any, classify: Any) -> Any Return an owned complete category XML report pane for a captured studio.
cleanup_failed_window function (owner: Any, error: BaseException) -> None Close failed construction or preserve its owner with both exceptions.
core_pythonqt_lab function (lab_id, *, profile=None, parent=None, font=None, package=None) Open one core PythonQt lab with its original named lesson profiles.
current_font function () -> Any FontLab's current font as a live Fontport font, or None.
designspace_panel function (designspace: Any, parent: Any=None, on_location: Callable[..., object] | None=None) -> Any Return axis sliders, fields and a source list over a designspace object.
duplicate_nodes function (mode: str) -> Any Run one of the original node-duplication policies on the current selection.
features_editor function (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.
follow_history function (owner: Any, callback: Callable[[], Any]) -> int Attach an owned callback to available Undo/Redo actions; Qt loads on use.
font_browser function (fonts: Any=(), parent: Any=None, on_activate: Callable[..., object] | None=None) -> Any Return a browser over a borrowed font list.
font_info_editor function (font: Any, parent: Any=None, on_apply: _ApplyCallback | None=None) -> Any Stage font information; <code>on&#95;apply(font, changes)</code> follows a good batch.
glyph_browser function (font: Any, parent: Any=None, on_activate: Callable[..., object] | None=None, multiple: bool=False) -> Any Return an owned glyph browser handle over <code>font</code>.
glyph_preview function (font: Any, name: str | None=None, parent: Any=None) -> Any Return an owned glyph detail preview; use <code>set&#95;glyph(name)</code><code>, </code><code>refresh()</code><code>, </code><code>close()</code>.
glyph_sequence function (font: Any, parent: Any=None, on_select: Callable[[Any, Any], None] | None=None) -> Any Show a text or glyph-name sequence; <code>on&#95;select(glyph&#95;or&#95;None, index)</code>.
glyph_table function (columns: Any, parent: Any=None, layer_column: bool=False) -> Any Return an owned sortable, filterable glyph list; <code>row&#95;selected(name, layer)</code>.
glyph_view function (font: Any, parent: Any=None, *, name: str | None=None, layer: str | None=None, controls: bool=False, read_on… Return an owned TGlyph glyph view (<code>load</code><code>, </code><code>refresh</code><code>, </code><code>set&#95;overlay</code><code>, </code><code>highlight</code>).
groups_editor function (font: Any, parent: Any=None, on_apply: _ApplyCallback | None=None) -> Any Edit explicit groups; <code>on&#95;apply(font, groups)</code> follows one good batch.
hint_tools_window function (*args: Any, **kwargs: Any) -> Any Open captured-font PostScript hint tasks in the shared studio shell.
identity_panel function (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 function (*args: Any, **kwargs: Any) -> Any Describe one retained identity/feature task for a studio.
identity_studio function (*args: Any, **kwargs: Any) -> Any Open an identity/feature studio with guarded actions and captured previews.
kerning_editor function (font: Any, parent: Any=None, on_apply: _ApplyCallback | None=None) -> Any Inspect explicit and effective kerning pairs; edit them in one batch.
kerning_snapshot function (package: Any, *, typed: bool=False) -> Any Read every master's kerning pairs and classes of a live native package.
layer_is_hinted function (layer: Any) -> Any Return the <code>HintState</code> of a native layer (PostScript hints, TrueType data, TT hinting).
metrics_preview function (font: Any, parent: Any=None, *, text: str | None=None, controls: bool=False, layer: str | None=None, label_p… Return an owned TMetrics text preview (<code>set&#95;text</code><code>, </code><code>set&#95;layer</code><code>, </code><code>set&#95;view</code><code>, </code><code>highlight&#95;pair</code>).
metrics_window function (font: Any=None, text: str | None=None, *, parent: Any=None) -> Any Open the standalone TMetrics window (with its own controls) for <code>font</code>; return it.
outline_generators_backends function () -> Any Return the named outline-generator services used by studio tasks.
outline_studio function (title: str, parent: Any=None, **kwargs: Any) -> Any Open the exact outline task composition for the requested studio.
owned_panel_type function () -> type Return the lazy owned-widget base for studio panels and their cleanup.
raise_ascender_tab function (studio: Any, *, backend: Any=None) -> Any Build the owned ascender task, closing partial construction on failure.
remove_hints function (layer: Any, label: str, *, glyph: Any, commit: Callable[..., Any] | None=None) -> Any Remove the PostScript hints of a native <code>layer</code><code> as one Undo step named </code><code>label</code>.
show_node_editor function (parent: Any=None) -> Any Open the captured-font Node Editor with its live coordinate preview.
show_outline_compatibility function (*args: Any, **kwargs: Any) -> Any Open contour order, node statistics and guarded compatibility tasks.
transform_editor function (font: Any, name: str | None=None, parent: Any=None, on_change: Callable[[Any, Any], None] | None=None, on_in… Preview an affine transform of one detached UFO glyph.
write_kerning function (package: Any, edits: Any, undo_name: str, *, expected: Any=None) -> bool Write <code>{master: {pair: value or None}}</code> on any masters as one named Undo step.