On this page

NativeFontFace

from noon import NativeFontFace

Source-derived class. Host availability is not inferred from this listing. See reference scope.

Bases: object. Declared members follow; inherited and dynamically attached members are not expanded.

Immutable font bytes shared with Rust for native text shaping.

The constructor accepts the family's native metadata name, exact font bytes,
and the face index within a collection. This wrapper is reusable: each Text
constructor passes an owned ``cloneFace()`` wrapper to Rust.

NativeFontFace.__init__

NativeFontFace.__init__(self, family: str, data: bytes | bytearray | memoryview, face_index: int=0)
ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default
familypositional or keywordstrNo default
datapositional or keywordbytes | bytearray | memoryviewNo default
face_indexpositional or keywordint0

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

NativeFontFace.bundled

NativeFontFace.bundled(cls, family: str) -> NativeFontFace

Decorators: classmethod

ParameterKindAnnotationDefault
clspositional or keywordNot annotatedNo default
familypositional or keywordstrNo default

Return annotation: NativeFontFace

Use a font embedded with Noon, without transferring font bytes.

Source declaration

NativeFontFace.family

NativeFontFace.family(self) -> str

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: str

No docstring declared here. Consult the source and host reference.

Source declaration

NativeFontFace.face_index

NativeFontFace.face_index(self) -> int

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: int

No docstring declared here. Consult the source and host reference.

Source declaration

NativeFontFace.metrics_profile

NativeFontFace.metrics_profile(self) -> str

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: str

No docstring declared here. Consult the source and host reference.

Source declaration

NativeFontFace.with_metrics_profile

NativeFontFace.with_metrics_profile(self, profile: str) -> NativeFontFace
ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default
profilepositional or keywordstrNo default

Return annotation: NativeFontFace

Return an immutable font input with an explicit Rust layout recipe.

``cairo-freetype`` is the portable default. ``cairo-coretext`` selects
fractional Pango placement and Cairo/CoreText paths for static monochrome
TrueType faces; Rust rejects unsupported faces before scene admission.

Source declaration