Skip to main content
Fonts and picture backends in a page or a worker. See JS API in the browser.

portableFaceProvider()

The portable profile served as static files from urlFor(file). Lazy: the first document pulls the faces it uses (a Calibri letter costs Carlito’s four files, about 1 MB), not the 16 MB profile. Import from @reductoai/pptx/browser.

tableFaceProvider()

Lazy, content-addressed faces served as plain files. install costs the table alone; each face downloads once, the first time a document needs it, and stays for the session. A face that fails to download is left absent, so layout falls back exactly as it would on a machine missing that font. Import from @reductoai/pptx/browser.

FaceProvider

How face bytes reach the browser. FaceSource.bytes() is synchronous, so a layout cannot fetch mid-run; layoutDocxInBrowser lays out once to trace the faces it needs, calls fetch with those ids, and lays out again when bytes arrived. bytes serves canvas FontFace loading and PDF embedding. Import from @reductoai/pptx/browser.

installBrowserMetafileBackend()

Install the browser metafile backend and return it. Safe to call once per page; a later call replaces the backend. Import from @reductoai/pptx/browser.

serveMetafileRaster()

Serve raster requests on this worker’s scope until it is terminated. Import from @reductoai/pptx/browser.

installBrowserSvgRasterizer()

Route PPTX SVG pictures through the metafile backend. Text SVGs from PowerPoint charts resolve their faces by name inside resvg, so the backend’s per-job face fetch is the only thing that puts glyphs on the canvas. Import from @reductoai/pptx/browser.

BrowserSvgOptions

Import from @reductoai/pptx/browser.