Files
FontMM/web/package.json
T
YuleBest 2ec6c45c80 feat(webui): 字重范围覆写 fonts.xml — 裁切/平均分配两种模式
- 新增 web/src/fontsXml.ts: generateSansSerifFamily / applyWghtMode (字符串级
  替换 sans-serif family 段, 保留 #ifdef 注释与格式) + fast-xml-parser 校验
- 配置页新增「字重覆写模式」: 不处理 / 裁切粗细等级 / 平均分配字重
  (模式持久化到 FONTS/wght-mode.txt, 无可变字体时禁用提示)
- 应用时覆写流程: 从 hans/hant/en 收集 wght 范围 (emoji/mono 除外),
  多可变取跨度最小者; cp fonts.xml -> fetch -> 替换 -> base64 分块写回
  模块 system/etc/fonts.xml; 无可变或模式 0 时跳过, 失败不阻断应用
- 平均分配: 400 固定, 两端按范围线性插值 (floor); 裁切: 仅保留范围内的字重
- README 特性与使用说明更新
2026-08-08 01:53:53 +08:00

31 lines
652 B
JSON

{
"name": "fontmm-webui",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "oxlint",
"fmt": "oxfmt",
"fmt:check": "oxfmt --check",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@material/web": "^2.4.1",
"fast-xml-parser": "^5.10.1",
"kernelsu": "^3.0.2",
"material-symbols": "^0.28.0",
"opentype.js": "^2.0.0",
"pyodide": "^314.0.3"
},
"devDependencies": {
"oxfmt": "^0.61.0",
"oxlint": "^1.76.0",
"sass": "^1.86.0",
"typescript": "^5.8.0",
"vite": "^6.0.11"
}
}