Skip to content

fontlabapp.fontui.hinting · declarations 001

Back to fontlabapp.fontui.hinting

PS_TEXT module-attribute

PS_TEXT

REMOVED_TEXT module-attribute

REMOVED_TEXT

TT_REMAINS_TEXT module-attribute

TT_REMAINS_TEXT

TT_TEXT module-attribute

TT_TEXT

font_hint_check

font_hint_check(font: Any) -> Callable[[str, str | None], HintState | None]

The default hint_check(name, layer) of TMetrics and TGlyph over font.

It resolves the live package at every call, so a closed or swapped font reads as unhinted (None) instead of keeping a stale native pointer.

hint_state_of

hint_state_of(package: Any, name: str, layer: str | None = None) -> HintState | None

layer_is_hinted of that live layer; None when the package, glyph or layer is absent.

layer_is_hinted

layer_is_hinted(layer: Any) -> HintState

Return the HintState of layer (None is not hinted).

native_layer

native_layer(package: Any, name: str, layer: str | None = None) -> Any

The live flLayer of glyph name on layer (default master) in package, or None.

Uses only findName/findLayer/isNull/defaultMaster, the lookup Fontport's host uses; no other native attribute is read.

package_of

package_of(font: Any) -> Any

The live FontLab package behind a Fontport-backed font, or None (detached or no host).

recheck_text

recheck_text(state: HintState) -> str

Status text after a removal: TrueType remains, still hinted, or removed.

remove_hints_with_recheck

remove_hints_with_recheck(layer: Any, label: str, *, glyph: Any, package: Any = None, commit: Callable[..., Any] | None = None) -> HintState

Remove the PostScript hints of layer as one Undo step named label; re-check.

glyph owns layer. commit(label, layers, glyphs, mutate, read_back) runs the history step (default: core.history.glyphs.commit with fresh auto facts of package; AppShell.history supplies its own). A layer without PostScript hints makes no history call. Return the state after the write; refusals and partial writes raise from commit.