Skip to Content

Function: createOpentypeSetupFromBuffers()

function createOpentypeSetupFromBuffers(fontBuffers: FontBuffer[], fontMapping?: FontMapping): Promise<OpentypeSetup | null>;

Create font measurement and SVG path resolution services from font buffers.

Use this for integrations that need to provide fonts explicitly instead of relying on Node.js system font directories.

Parameters

fontBuffers

FontBuffer[]

TTF, OTF, or TTC font file bytes.

fontMapping?

FontMapping

Optional PPTX font name to replacement font mapping.

Returns

Promise<OpentypeSetup | null>

Font services, or null when no usable font setup can be created.