config.FontSource
A font file the config names; the face is read from the file where it is null.
Utilização
Register a downloaded font file with its weight.
Este tipo é usado por 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}.Declaração do tipo
export interface FontSource extends IconSource {
family: string | null;
weight: number | null;
style: 'normal' | 'italic' | null;
}Membros 5
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
family | string | Sim | — |
weight | number | Sim | — |
style | "normal" | "italic" | Sim | — |
path | string | Sim | — |
origin | string | Sim | The file and key that set it, and the path as written. |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.