Usage

Register a downloaded font file with its weight.

This type is used by 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}.

Type declaration

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

Type

ts
string | {    uri: string;    weight?: FontWeight;    style?: "normal" | "italic";}
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.