import { FontFamilyName } from './typography';
/**
* Self-hosted font files (woff2) per family and the Unicode subsets they cover. The active family is ACTIVE_FONT in
* typography.ts: to switch, change the constant (both families' files are in fonts/ and shipped); `npm run gen:tokens`
* regenerates the @font-face rules and fails with the list of missing files if any are absent.
*/
export interface FontFile {
file: string;
style: 'normal' | 'italic';
range: string;
/** The file the page needs for first paint (main latin subset): hosts `` it, see `activeFontPreloadFile`. */
preload?: true;
}
export interface FontFaceSet {
family: string;
/** Weights the family covers (the kit uses 300–800). */
weights: readonly number[];
/**
* One @font-face per file with `font-weight: `. Without it, one face per weight, all pointing at the same
* variable file (for a face that must not mix with other single-weight faces of the same family). Files are always
* variable (wght axis covering 300–800): static per-weight files are not allowed, design-system.test.ts checks it.
*/
weightRange?: readonly [number, number];
/** Open Sans ships `font-stretch: 100%`; the others do not. */
stretch: boolean;
files: readonly FontFile[];
}
/**
* The weights stokr.io has always loaded. No 500 on purpose: the apps' `font-weight: 500` (menus, labels, links) has always
* matched the 400 face, and declaring a 500 face would turn all of it medium. One face per weight, not a `300 800` range:
* mixed with the single-weight Bitcoin face a range face lost the match at some weights and text fell back to serif.
*/
export declare const loadedWeights: readonly [300, 400, 600, 700, 800];
export declare const fontFaces: Record;
/** File name (in fonts/, shipped under `@stokr/components-library/design-system/fonts/`) of the active family's main latin file: what a host preloads. */
export declare const activeFontPreloadFile: string;