Skip to content

fontlabapp.fontui.shaping

shaping

Qt-free text shaping for the TMetrics and TGlyph windows.

shape turns a duck-typed font (glyph widths, unicodes, feature text, kerning and groups) plus a text string into positioned glyphs. With the optional uharfbuzz extra the font is compiled to a minimal in-memory binary (empty outlines, real metrics, cmap, GSUB/GPOS from the feature text and from the kerning data) and shaped by HarfBuzz. Without it the Fontport glyph-run layout is used instead and the result says it was shaped=False.

Classes

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
CACHE_SIZE attribute
FALLBACK_NOTE attribute
KERN_GROUP_PREFIXES attribute
PUA_BASE attribute
clear_cache function () -> None Forget every compiled font blob.
parse_features function (spec: str) -> tuple[dict[str, bool | int], list[str]] Parse <code>&quot;liga,-kern,ss01,cv01=2&quot;</code> into a HarfBuzz feature mapping.
shape function (font: Any, text: str, *, features: str='', direction: str='ltr', script: str | None=None, language: str | No… Shape <code>text</code><code> with </code><code>font</code>.
shape_names function (font: Any, names: list[str], **options: Any) -> GlyphRunResult Shape a run given as glyph names (no leading slash).