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)
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
family | positional or keyword | str | No default |
data | positional or keyword | bytes | bytearray | memoryview | No default |
face_index | positional or keyword | int | 0 |
Return annotation: Not annotated
No docstring declared here. Consult the source and host reference.
NativeFontFace.bundled
NativeFontFace.bundled(cls, family: str) -> NativeFontFaceDecorators: classmethod
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
cls | positional or keyword | Not annotated | No default |
family | positional or keyword | str | No default |
Return annotation: NativeFontFace
Use a font embedded with Noon, without transferring font bytes.
NativeFontFace.family
NativeFontFace.family(self) -> strDecorators: property
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
Return annotation: str
No docstring declared here. Consult the source and host reference.
NativeFontFace.face_index
NativeFontFace.face_index(self) -> intDecorators: property
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
Return annotation: int
No docstring declared here. Consult the source and host reference.
NativeFontFace.metrics_profile
NativeFontFace.metrics_profile(self) -> strDecorators: property
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
Return annotation: str
No docstring declared here. Consult the source and host reference.
NativeFontFace.with_metrics_profile
NativeFontFace.with_metrics_profile(self, profile: str) -> NativeFontFace
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
profile | positional or keyword | str | No 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.