UNPKG

pptx-embed-fonts

Version:
71 lines (68 loc) 3.07 kB
import * as opentype from 'opentype.js'; import pptxgenjs from 'pptxgenjs'; import PPTXEmbedFonts from './index.js'; import 'jszip'; interface ExportPresentationOptions { outputType?: string; compression?: boolean; } declare module "pptxgenjs" { export default interface PptxGenJS { exportPresentation(...args: any[]): Promise<string | ArrayBuffer | Blob | Buffer | Uint8Array>; } } declare function withPPTXEmbedFonts(pptxgen: typeof pptxgenjs): { new (): { #superExportPresentation: (options: ExportPresentationOptions) => Promise<any>; readonly _pptxEmbedFonts: PPTXEmbedFonts; addFont(options: { fontFace: string; fontFile: ArrayBuffer; fontType: "ttf" | "eot" | "woff" | "otf"; }): Promise<void>; getFontInfo(fontFile: ArrayBuffer): opentype.Font; readonly version: string; readonly presLayout: pptxgenjs.PresLayout; readonly AlignH: typeof pptxgenjs.AlignH; readonly AlignV: typeof pptxgenjs.AlignV; readonly ChartType: typeof pptxgenjs.ChartType; readonly OutputType: typeof pptxgenjs.OutputType; readonly SchemeColor: typeof pptxgenjs.SchemeColor; readonly ShapeType: typeof pptxgenjs.ShapeType; readonly PlaceholderType: typeof pptxgenjs.PLACEHOLDER_TYPES; layout: string; rtlMode: boolean; author: string; company: string; revision: string; subject: string; theme: pptxgenjs.ThemeProps; title: string; stream(props?: pptxgenjs.WriteBaseProps): Promise<string | ArrayBuffer | Blob | Uint8Array>; write(props?: pptxgenjs.WriteProps): Promise<string | ArrayBuffer | Blob | Uint8Array>; writeFile(props?: pptxgenjs.WriteFileProps): Promise<string>; addSection(props: pptxgenjs.SectionProps): void; addSlide(props?: pptxgenjs.AddSlideProps): pptxgenjs.Slide; addSlide(masterName?: string): pptxgenjs.Slide; defineLayout(layout: pptxgenjs.PresLayout): void; defineSlideMaster(props: pptxgenjs.SlideMasterProps): void; tableToSlides(eleId: string, props?: pptxgenjs.TableToSlidesProps): void; exportPresentation(...args: any[]): Promise<string | ArrayBuffer | Blob | Buffer | Uint8Array>; }; AlignH: typeof pptxgenjs.AlignH; AlignV: typeof pptxgenjs.AlignV; ChartType: typeof pptxgenjs.ChartType; OutputType: typeof pptxgenjs.OutputType; SchemeColor: typeof pptxgenjs.SchemeColor; ShapeType: typeof pptxgenjs.ShapeType; charts: typeof pptxgenjs.charts; shapes: typeof pptxgenjs.shapes; CHART_TYPE: typeof pptxgenjs.CHART_TYPE; SCHEME_COLOR_NAMES: typeof pptxgenjs.SCHEME_COLOR_NAMES; PLACEHOLDER_TYPES: typeof pptxgenjs.PLACEHOLDER_TYPES; SLIDE_OBJECT_TYPES: typeof pptxgenjs.SLIDE_OBJECT_TYPES; TEXT_HALIGN: typeof pptxgenjs.TEXT_HALIGN; TEXT_VALIGN: typeof pptxgenjs.TEXT_VALIGN; Slide: typeof pptxgenjs.Slide; }; export { withPPTXEmbedFonts as default, withPPTXEmbedFonts };