FontSource
A font file: a file:// URI, or one with the weight and style it draws.
Verwendung
Register a downloaded font file with its weight.
Dieser Typ wird verwendet von 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}.Typdeklaration
export type FontSource = string | { uri: string; weight?: FontWeight; style?: 'normal' | 'italic' };Typ
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.