Utilização

Register a downloaded font file with its weight.

Este tipo é usado por fonts.load

tsx
// 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

ts
export type FontSource = string | { uri: string; weight?: FontWeight; style?: 'normal' | 'italic' };

Tipo

ts
string | {    uri: string;    weight?: FontWeight;    style?: "normal" | "italic";}
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.