fontlabapp.fontui.shaping · declarations 001
Back to fontlabapp.fontui.shaping
CACHE_SIZE
module-attribute
CACHE_SIZE
FALLBACK_NOTE
module-attribute
FALLBACK_NOTE
KERN_GROUP_PREFIXES
module-attribute
KERN_GROUP_PREFIXES
PUA_BASE
module-attribute
PUA_BASE
clear_cache
clear_cache() -> None
Forget every compiled font blob.
parse_features
parse_features(spec: str) -> tuple[dict[str, bool | int], list[str]]
Parse "liga,-kern,ss01,cv01=2" into a HarfBuzz feature mapping.
Returns the mapping and a diagnostic for every token that was skipped.
shape
shape(font: Any, text: str, *, features: str = '', direction: str = 'ltr', script: str | None = None, language: str | None = None, kerning: bool = True) -> GlyphRunResult
Shape text with font.
features is a HarfBuzz feature list such as "liga,-kern,ss01".
Text made only of whitespace-separated /glyphname tokens is treated
as glyph names rather than characters. Raises ValueError for an
unknown direction and TypeError for non-string text.
shape_names
shape_names(font: Any, names: list[str], **options: Any) -> GlyphRunResult
Shape a run given as glyph names (no leading slash).