UNPKG

cn-font-split

Version:

划时代的字体切割工具,CJK与任何字符!支持 otf、ttf、woff2 字体多线程切割,完美地细颗粒度地进行包大小控制。A revolutionary font subetter that supports CJK and any characters! It enables multi-threaded subset of otf, ttf, and woff2 fonts, allowing for precise control over package size.

6 lines (5 loc) 453 B
import { api_interface } from './gen/index'; import { FontSplitProps } from './interface'; export * from './decodeReporter'; export { api_interface as proto }; export declare const createAPI: <OriginCB extends (buffer: any, length: number) => void>(font_split: (buffer: Uint8Array, length: number, cb: OriginCB) => void, createCallback: (cb: (data: Uint8Array) => void) => OriginCB, finallyFn?: () => void) => (config: FontSplitProps) => Promise<void>;