mirror of
https://github.com/2234839/web-font.git
synced 2026-11-24 10:53:35 +08:00
- parse 只扫描 encoding records 记录 Unicode 子表偏移,不再展开 3 万条 cmap 条目 - cmap_get 单码点查询在 mmap 字节上二分(format4 段二分/format12 group 二分), 逐 cp 复刻原插入语义(format4 gid=0 不插 / format12 插 0 覆盖 / 多子表顺序覆盖→逆序查找) - rev 反向索引改 OnceLock 延迟构建:GSUB 字体子集请求永远不付这份成本 - 回归红线:4 字体×4 文本(含 CJK/日文/扩展平面)新旧产物 sha256 全部一致;51 测试过 - 实测:冷 Read 1~3ms→0ms;线上容器内存 ~8MB→4.4MB
56 lines
1.9 KiB
JSON
56 lines
1.9 KiB
JSON
{
|
|
"name": "webfont",
|
|
"private": true,
|
|
"version": "1.15.4",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "pnpx tsx scripts/dev-all.ts",
|
|
"dev:frontend": "vite",
|
|
"dev:backend": "pnpx tsx backend/app.ts",
|
|
"dev:backend:llrt": "pnpm build_backend && ./llrt ./dist_backend/app.cjs",
|
|
"serve:llrt": "./llrt ./dist_backend/app.cjs",
|
|
"build": "vite-ssg build",
|
|
"build_backend": "pnpx tsx scripts/build-backend.ts",
|
|
"build_backend_rs": "cargo build --profile tinyfast --target x86_64-unknown-linux-musl --manifest-path rust-spike/Cargo.toml && cp rust-spike/target/x86_64-unknown-linux-musl/tinyfast/webfont-rs dist_backend/webfont-rs",
|
|
"lint:font-config": "pnpx tsx scripts/lint-font-config.ts",
|
|
"docker_build": "docker build -t llej0/web-font:${npm_package_version} -t llej0/web-font:latest .",
|
|
"docker_push": "docker push llej0/web-font:${npm_package_version} && docker push llej0/web-font:latest",
|
|
"preview": "vite preview",
|
|
"release": "pnpm build && pnpm build_backend_rs && pnpm docker_build && pnpm docker_push"
|
|
},
|
|
"dependencies": {
|
|
"@unhead/vue": "^3.4.3",
|
|
"pinyin-pro": "^3.29.5",
|
|
"web-streams-polyfill": "^4.3.0",
|
|
"webfont-sdk": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@leafer-ui/node": "2.2.9",
|
|
"@types/node": "26.6.5",
|
|
"@types/pngjs": "^6.0.5",
|
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
"@xmldom/xmldom": "^0.9.12",
|
|
"jsdom": "^30.1.3",
|
|
"pngjs": "^7.0.0",
|
|
"puppeteer": "^25.16.0",
|
|
"tsdown": "^0.23.2",
|
|
"typescript": "^7.0.2",
|
|
"undici": "^8.12.3",
|
|
"vite": "^8.3.5",
|
|
"vite-plugin-commonjs": "^0.10.4",
|
|
"vite-plugin-pilot": "^1.0.36",
|
|
"vite-ssg": "^28.3.0",
|
|
"vitest": "^5.0.5",
|
|
"vue": "3.6.0-beta.17",
|
|
"vue-router": "^5.4.0"
|
|
},
|
|
"optionalDependencies": {
|
|
"@napi-rs/canvas": "^1.0.13"
|
|
},
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"puppeteer"
|
|
]
|
|
}
|
|
}
|