fonts.load
Registers each family's files, by the name fontFamily uses.
Utilisation
Register a downloaded font file with its weight.
// 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}.Signatures
(fonts: Record<string, FontSource | readonly FontSource[]>): Promise<void>Paramètres
| Nom | Type | Requis | Description |
|---|---|---|---|
fonts | Record<string, FontSource | readonly FontSource[]> | Oui | — |
Retourne
Promise<void>
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.