config.FontSource
A font file the config names; the face is read from the file where it is null.
Utilisation
Register a downloaded font file with its weight.
Ce type est utilisé par 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}.Déclaration du type
export interface FontSource extends IconSource {
family: string | null;
weight: number | null;
style: 'normal' | 'italic' | null;
}Membres 5
| Nom | Type | Requis | Description |
|---|---|---|---|
family | string | Oui | — |
weight | number | Oui | — |
style | "normal" | "italic" | Oui | — |
path | string | Oui | — |
origin | string | Oui | The file and key that set it, and the path as written. |
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.