docs(client): 修订 pangolin_theme 字体注释(改本地打包后过时描述)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-22 07:51:58 +08:00
parent 6fc032bac8
commit 7e7854427c
+8 -7
View File
@@ -6,7 +6,7 @@
// · PangolinScheme — ThemeExtension(语义色映射 + light/dark 实例)
// · PangolinContext — BuildContext 扩展
// · PangolinFonts — 字族标签常量
// · PangolinText — google_fonts 运行时字型
// · PangolinText — 本地打包字型(生产 useBundled,离线;测试经 FontLoader
// · PangolinTheme — ThemeData 组装
//
// Usage:
@@ -144,9 +144,10 @@ extension PangolinContext on BuildContext {
}
/// ── Font families ───────────────────────────────────────────────────
/// 生产用 google_fonts 运行时加载;测试态设 [useBundled]=true,改用本地
/// FontLoader 注册的同名 family(避免 google_fonts 在无网/禁拉取时抛异常,
/// 让 golden 截图回归可跑)。封装函数是 PangolinText/_build 的唯一字体入口。
/// 生产用本地打包字体([useBundled]=truepubspec fonts: 段,离线);保留的
/// [useBundled]=false 分支走 google_fonts 运行时加载,仅作回退/对照。测试态由
/// flutter_test_config 经 FontLoader 注册同名 family。封装函数是 PangolinText/
/// _build 的唯一字体入口。
class PangolinFonts {
PangolinFonts._();
static const display = 'Sora';
@@ -188,9 +189,9 @@ class PangolinFonts {
}
/// ── Type scale ──────────────────────────────────────────────────────
/// Uses google_fonts for runtime font loading (no local ttf required).
/// All PangolinText members are static getters (not const) so they can
/// reference google_fonts, which registers fonts dynamically.
/// Uses locally-bundled fonts via [PangolinFonts] (production `useBundled=true`,
/// offline; tests register fonts via FontLoader). Members are static getters
/// (not const) so they route through the [PangolinFonts] wrapper functions.
class PangolinText {
PangolinText._();