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.

30 lines (29 loc) 778 B
//#region src/load.ts var e = (e, t, n) => ({ android: { arm64: null, arm: null }, win32: { x64: "x86_64-pc-windows-msvc", arm64: "aarch64-pc-windows-msvc" }, darwin: { x64: "x86_64-apple-darwin", arm64: "aarch64-apple-darwin" }, freebsd: { x64: "x86_64-unknown-freebsd" }, linux: { x64: n() ? null : "x86_64-unknown-linux-gnu", arm64: n() ? null : "aarch64-unknown-linux-gnu", arm: null, riscv64: n() ? null : "riscv64gc-unknown-linux-gnu", s390x: "s390x-unknown-linux-gnu" } })[e]?.[t] ?? "wasm32-wasip1"; function t(e) { return `libffi-${e}.${e.includes("windows") ? "dll" : e.includes("darwin") ? "dylib" : e.includes("wasm") ? "wasm" : "so"}`; } //#endregion export { t as getBinName, e as matchPlatform }; //# sourceMappingURL=load.mjs.map