feat(client): 字体改本地打包(拉丁全量 + Noto Sans SC GB2312 子集)
生产 PangolinFonts.useBundled=true,离线可用,不再运行时拉 google_fonts; 中文经 fontFamilyFallback=[Noto Sans SC] 兜底,子集外字符再兜系统 CJK 字体。 - 拉丁:Sora/Manrope/JetBrains Mono 静态权重(复用 test/fonts)。 - 中文:Noto Sans SC 变量字体 instance 到 Regular + subset 到 GB2312 6763 字 (单权重,粗体引擎合成),client/fonts 合计约 3.4MB。 - tools/fonts/make-cjk-subset.sh 可复现生成(GB2312 字表无需联网)。 - 新增 test/unit/fonts_test.dart 锁定接线;golden 因 notdef 占位字形微调已更新。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+27
-2
@@ -46,5 +46,30 @@ flutter:
|
||||
- assets/app-icon.svg
|
||||
- assets/tray_icon.png
|
||||
|
||||
# ── 字体(由 google_fonts 运行时加载,无需本地 ttf)──
|
||||
# 若需离线/打包字体,下载 ttf 放 fonts/,并按 pubspec 模板恢复 fonts: 段。
|
||||
# ── 字体(本地打包,全平台离线)──
|
||||
# 拉丁全量(Sora/Manrope/JetBrains Mono)+ Noto Sans SC 子集(GB2312 6763 字,单 Regular
|
||||
# 权重;CJK 粗体由引擎合成)。子集由 tools/fonts/make-cjk-subset.sh 可复现生成。
|
||||
# 生产经 PangolinFonts.useBundled=true 走这些 family;中文经 fontFamilyFallback 兜底。
|
||||
fonts:
|
||||
- family: Sora
|
||||
fonts:
|
||||
- asset: fonts/Sora-Regular.ttf
|
||||
- asset: fonts/Sora-SemiBold.ttf
|
||||
weight: 600
|
||||
- asset: fonts/Sora-Bold.ttf
|
||||
weight: 700
|
||||
- family: Manrope
|
||||
fonts:
|
||||
- asset: fonts/Manrope-Regular.ttf
|
||||
- asset: fonts/Manrope-Medium.ttf
|
||||
weight: 500
|
||||
- asset: fonts/Manrope-SemiBold.ttf
|
||||
weight: 600
|
||||
- asset: fonts/Manrope-Bold.ttf
|
||||
weight: 700
|
||||
- family: JetBrains Mono
|
||||
fonts:
|
||||
- asset: fonts/JetBrainsMono-Regular.ttf
|
||||
- family: Noto Sans SC
|
||||
fonts:
|
||||
- asset: fonts/NotoSansSC-Regular-subset.otf
|
||||
|
||||
Reference in New Issue
Block a user