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 interface FontSource extends IconSource {
  family: string | null;
  weight: number | null;
  style: 'normal' | 'italic' | null;
}

Mitglieder 5

NameTypErforderlichBeschreibung
familystringJa—
weightnumberJa—
style"normal" | "italic"Ja—
pathstringJa—
originstringJaThe file and key that set it, and the path as written.
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.