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.

29 lines (28 loc) 918 B
#!/usr/bin/env node import { Command as n } from "commander"; import { getCliParams as p } from "./gen/proto.mjs"; import { runInitScript as o } from "./init.mjs"; import c from "set-value"; p(process.argv, (a, r) => { r.action(async (s) => { let t; process.versions.bun ? t = (await import("./bun/index.mjs")).fontSplit : t = (await import("./node/index.mjs")).fontSplit; const i = { ...s }; Object.entries(i).forEach(([e, m]) => { c(i, e, m); }), await t(i); }), a.usage( ` cn-font-split -i <字体地址> -o <文件夹地址> cn-font-split run -h # 查看更详细信息` ).description("").addCommand( new n("i").description("安装指定源 wasm32-wasip1@版本号").action(async () => { await o(); }) ).addCommand( new n("ls").description("列出本地和远程信息").action(async () => { await o(); }) ); }); //# sourceMappingURL=cli.mjs.map