/** * Registers a font binary (ArrayBuffer) under a scoped @font-face name so the * browser renders text with the exact same bytes that HarfBuzz/harfrust shapes. * * The scoped name avoids conflicts with any other @font-face entries the page * may have for the same family (e.g. subsetted Google Fonts WOFF2 files). */ /** * Register a font binary as an @font-face with a unique scoped family name. * * The same ArrayBuffer identity always returns the same scoped name. * The returned `ready` promise resolves once the FontFace is loaded and added * to `document.fonts`. Await it before measuring text with this font. * * @param family - Human-readable family name (used to build the scoped name) * @param binary - Full (non-subsetted) font file bytes (TTF/OTF/WOFF2) * @returns `{ name, ready }` — scoped family name and load promise */ export declare function registerFontBinary(family: string, binary: ArrayBuffer): { name: string; ready: Promise; }; /** * Register multiple font binaries (one per weight) under a single scoped * @font-face family name. Used for static font families that ship separate * files per weight (e.g. `Roboto-Regular.woff2`, `Roboto-Bold.woff2`). * * Each entry becomes a separate FontFace with a narrow weight descriptor so * the browser selects the correct face for the CSS `font-weight`. * * @param family - Human-readable family name * @param entries - Array of `{ binary, weight }` pairs * @returns `{ name, ready }` — scoped family name and a promise that resolves * when all FontFaces are loaded */ export declare function registerFontBinaryMap(family: string, entries: { binary: ArrayBuffer; weight: number; }[]): { name: string; ready: Promise; }; //# sourceMappingURL=resolve-font-binary.d.ts.map