Verwendung

Register a downloaded font file with its weight.

Dieser Typ wird verwendet von 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}.

Typdeklaration

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

Typ

ts
string | {    uri: string;    weight?: FontWeight;    style?: "normal" | "italic";}
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.