fonts
Loads font files at run time, for families the app does not bundle through kuito.config.ts.
Verwendung
Register a downloaded font file with its weight.
// 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}.Exporte 4
Methoden, Konstanten und Typen, die dieser native Namespace bereitstellt.
function
loadRegisters each family's files, by the name fontFamily uses.typeFontWeightA font file's weight: 'normal' (400), 'bold' (700), or 100 to 900 in hundreds.typeFontSourceA font file: a file:// URI, or one with the weight and style it draws.functionloadedWhether fontFamily takes family: bundled, or loaded by load.Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.