config.FontSource
A font file the config names; the face is read from the file where it is null.
Usage
Register a downloaded font file with its weight.
This type is used by fonts.load
// Register a downloaded font file with its weight.
import { fonts, type FontWeight } from 'kuito';
export async function registerHeadingFont(localFileURI: string) {
const weight: FontWeight = 700;
await fonts.load({ Heading: { uri: localFileURI, weight } });
}
// Pass a file:// URI, then use fontFamily="Heading" and fontWeight={700}.Type declaration
export interface FontSource extends IconSource {
family: string | null;
weight: number | null;
style: 'normal' | 'italic' | null;
}Members 5
| Name | Type | Required | Description |
|---|---|---|---|
family | string | Yes | — |
weight | number | Yes | — |
style | "normal" | "italic" | Yes | — |
path | string | Yes | — |
origin | string | Yes | The file and key that set it, and the path as written. |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.