Verwendung

Register a downloaded font file with its weight.

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}.

Typdeklaration

ts
export type FontWeight = 'normal' | 'bold' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;

Typ

ts
"normal" | "bold" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.