/** * Font embedding for PPTX export. * * Collects the non-system font families actually used in the deck, fetches their * woff2 bytes (bundled via `new URL(...)` so Vite emits them), decompresses * woff2 → TTF (via woff-lib, pure TS), and returns `AddFontOptions[]` for * `pptx.addFont()`. PPTX embeds fonts as EOT-wrapped data and pptxgenjs handles * TTF/OTF directly, so the only required step is woff2 → TTF decompression. * * woff-lib replaced wawoff2 here: wawoff2 is a Node-targeted Emscripten binary * whose `onRuntimeInitialized` promise never resolves when the runtime fails to * boot inside a bundled web build, hanging exports forever with no error. */ import type pptxgen from 'pptxgenjs-plus'; import type { PptxExportCommand } from './pptxExportCommands'; type AddFontOptions = Parameters[0]; /** Collect candidate font families from a CSS font-family string. */ export declare const parseFontFamilyList: (value?: string) => string[]; /** Bundled fonts travel with the deck, even when installed on this computer. */ export declare const isEmbeddableFont: (family: string) => boolean; /** * Embed fonts used in the deck into the PPTX. * `usedFamilies` should be the raw font-family strings gathered from elements/theme. * Unbundled families remain available for the viewer to resolve. A bundled font * failing to load rejects export instead of silently losing portability. */ export declare const collectEmbeddedFonts: (usedFamilies: string[]) => Promise; /** * Inspect the final generator commands, including rich text runs, shape text, * tables, charts and theme defaults. CSS fallback lists are not OOXML typefaces; * use their first family and the same canonical name as our embedded font. */ export declare const preparePptxFontFamilies: (commands: PptxExportCommand[]) => string[]; export {};