5 Commits

Author SHA1 Message Date
chinboy 4391e14155 docs(Typography): define font subsystem architecture
新增 `docs/architecture/systems/typography/`,记录字体子系统的当前架构。此前字体只有
`docs/modules/fonts/overview.md` 一页概览,跨模块的契约、派生算法和边界没有正式所有者。

字体跨 `AtomUI.Core`、两个 `AtomUI.Fonts.*` 包、`AtomUI.Controls` 和消费控件,按文档分类规范
属于 `architecture/systems/`。核心结论是它由两条互不相干的轴组成:字体资源注册进 Avalonia
`FontManager`,与主题编译字号行高 Token,两者只在解析 `FontFamily` 字符串时汇合,没有任何代码
把它们对账。

按职责拆成六篇:overview 定位与两轴架构;font-packages 讲 `FontCollection` 与注册入口;
font-family-resolution 讲回退链、覆盖路径与注入时序;tokens-and-derivation 讲 23 个 Token 的
分级与 `e^(i/5)` 阶梯算法;consumption 讲 AXAML 与 C# 消费面和相对行高换算;verification 讲
AOT、兼容性、验证要求与已知不一致。

记录三处已确认的实现问题,均经源码核对:

- Compact 算法不压缩字号。`CalculateFontMapTokenValues` 以 `FontSize` 而非 `FontSizeSM` 为基数,
  且第 1 档强制等于基数使重算幂等,因此 Compact 与 Default 的字体 Token 完全相同。上游 antd
  compact 取 `fontSizeSM`,`FontSize = 14` 时应得 12 而非 14。共享派生函数里还留着上游那句
  `// Smaller size font-size as base` 注释,位置已使其不再成立。
- 默认字体族首项 `fonts:AlibabaSans` 是前向引用。`AtomUI.Core` 不依赖字体包,`AtomUI.Controls`
  的项目引用也不含 `AddFontCollection`;未注册时 Avalonia 静默回退,全程无诊断信号。
- 相对行高到绝对行高的换算在五个控件中各写一遍,无共享 helper,且必须同时监听行高与字号两个
  属性才不会在字号变化后失配。

同步在 `docs/overview.md`、Architecture 与 systems 导航、主题系统导航和 Fonts 模块接入入口。
2026-08-10 14:25:44 +08:00
chinboy 9f6ec36645 docs: rename directory entry files to overview.md
统一文档目录的入口文件名为 `overview.md`,取代原先的 `index.md`。单 Control 目录本来就用
`overview.md`,此前只有目录级入口用 `index.md`,两套命名并存;现在全库一致。

改名覆盖 42 个入口文件:`docs/` 根、一级分类目录、Architecture 分组与跨模块系统目录、Module
目录、Control 平台与分类目录、Guide 与 Reference 子目录。`docs/AI/generated/index.md` 是手工
维护的导航页,一并改名。

生成产物 `docs/AI/generated/llms/**/index-cn.md` 保持原名,它属于 LLMs Generator 的输出契约。

同步更新 28 个正式文档与 `AGENTS.md` 中的入站链接,以及两处目录树示意图。改名后全部相对链接
可解析,LLMs Generator `verify` 通过(78 控件 / 159 文件),单 Control 四件套文件名契约未变。

新增 `docs/engineering/contributing/documentation-structure-guidelines.md` 承载入口命名、文档
拆分标准、事实所有权和链接规范。此前该规则只写在带日期的设计过程记录里,不适合作为长期来源。
`docs/superpowers/specs/2026-08-10-documentation-information-architecture-design.md` 保留原文
并加取代说明,其余结论继续有效。
2026-08-10 14:24:36 +08:00
chinboy 0bc3447ebb docs: reorganize module engineering and Gallery domains 2026-08-10 09:32:07 +08:00
chinboy cfb7457145 refactor(Theme): rename Component to Control in token system and related files 2026-07-16 19:15:19 +08:00
chinboy 0764c1a77f feat(docs): reorganize and add overview documentation for various control categories 2026-06-09 14:18:40 +08:00