UNPKG

pptx-embed-fonts

Version:
34 lines (31 loc) 1.1 kB
import JSZip from 'jszip'; import opentype__default from 'opentype.js'; interface Font { name: string; data: ArrayBuffer; rid: number; } declare class PPTXEmbedFonts { zip: JSZip | undefined; rId: number; private _notLoadedError; fonts: Font[]; constructor(zip?: JSZip); loadZip(zip: JSZip): Promise<void>; load(fileBuffer: ArrayBuffer): Promise<void>; getFontInfo(fontBuffer: ArrayBuffer): opentype__default.Font; private updateContentTypesXML; private updatePresentationXML; private updateRelsPresentationXML; private updateFontFiles; uniqueId(): number; private eot2FntData; private addFont; addFontFromEOT(fontFace: string, eotFile: ArrayBuffer): Promise<void>; addFontFromTTF(fontFace: string, ttfFile: ArrayBuffer): Promise<void>; addFontFromWOFF(fontFace: string, woffFile: ArrayBuffer): Promise<void>; addFontFromOTF(fontFace: string, otfFile: ArrayBuffer): Promise<void>; updateFiles(): Promise<void>; save(): Promise<ArrayBuffer | Buffer<ArrayBufferLike>>; } export { PPTXEmbedFonts as default };