mirror of
https://github.com/2234839/web-font.git
synced 2026-06-27 17:48:31 +08:00
性能(vs v1.7.0 基线,基准测试全用例通过): - 千字文 woff2 346ms → 9.8ms(35x) - 8汉字 woff2 39.7ms → 2.8ms(14x) - 千字文 ttf 6.0ms → 4.4ms - 8汉字 ttf 2.7ms → 2.1ms OTF 正确性: - 修复 CFF.js readCFFIndexObject 漏读 off[idx+1] 导致子程序读成 0 字节, 思源黑体「法」字三点水丢笔画的问题 - 修复非 subset 模式 cmap format12 崩溃(空数组误判为 subset) 缓存健壮性: - subsetCache key 加版本指纹(package version + process.uptime), 杜绝代码已修但缓存返回旧错误结果 基准测试: - 新增白狐/思源 OTF 用例(含法海波等复杂笔画字)守护 OTF→TTF 转换 - 修复 calculateSSIM 的 width 推断 bug(sqrt 假设正方形) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35 lines
1.1 KiB
JSON
35 lines
1.1 KiB
JSON
{
|
|
"name": "webfont",
|
|
"private": true,
|
|
"version": "1.9.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "pnpx tsx scripts/dev-all.ts",
|
|
"dev:frontend": "vite",
|
|
"dev:backend": "pnpx tsx backend/app.ts",
|
|
"build": "vite build",
|
|
"build_backend": "pnpx tsx scripts/build-backend.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 && pnpm docker_build && pnpm docker_push"
|
|
},
|
|
"dependencies": {
|
|
"vue": "3.6.0-beta.10",
|
|
"web-streams-polyfill": "^4.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^25.9.1",
|
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
"@xmldom/xmldom": "^0.9.10",
|
|
"jsdom": "^29.1.1",
|
|
"pngjs": "^7.0.0",
|
|
"puppeteer": "^25.1.0",
|
|
"tsdown": "^0.22.1",
|
|
"typescript": "^6.0.3",
|
|
"undici": "^8.3.0",
|
|
"vite": "^8.0.14",
|
|
"vite-plugin-pilot": "^1.0.31",
|
|
"vitest": "^4.1.7"
|
|
}
|
|
} |