style(fonts): add text-autospace for CJK+Latin auto-spacing and sync design doc

- packages/ui/styles/base.css: add `text-autospace: ideograph-alpha
  ideograph-numeric` to html. Native CSS feature (Chrome 119+,
  Electron recent) that auto-inserts 1/4em space between CJK ideographs
  and Latin letters/numerals. Progressive enhancement — older browsers
  ignore the rule silently.
- docs/design.md: update font family table to reflect Inter + CJK system
  fallback. Reword font-bold ban rationale to be font-agnostic
  (information density / layout rhythm), not Geist-specific.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing
2026-04-15 08:45:23 +08:00
parent 4b10c9354a
commit 70e4f44860
2 changed files with 8 additions and 2 deletions

View File

@@ -69,10 +69,12 @@
| 角色 | 字体 | 用途 |
|------|------|------|
| 正文/UI | Geist Sans (`--font-sans`) | 所有界面文字的默认字体 |
| 正文/UI | Inter (`--font-sans`) | 所有界面文字的默认字体CJK 字符自动 fallback 到系统字体PingFang SC / Microsoft YaHei / Noto Sans CJK SC |
| 代码/数据 | Geist Mono (`--font-mono`) | 代码块、ID、时间戳、等宽数据 |
| 标题 | `--font-heading`= `--font-sans` | 页面标题、区块标题 |
字体栈在 `apps/web/app/layout.tsx``apps/desktop/src/renderer/src/globals.css` 两处声明,修改时需同步。
### 3.2 字号纪律
**整个项目只使用 3 个核心字号 + 1 个特殊字号:**
@@ -98,7 +100,7 @@
| `font-normal` (400) | 正文、描述、大部分文字 |
| `font-medium` (500) | 标签、按钮、导航项、标题、选中状态 |
**禁止** `font-bold` / `font-semibold`——它们在 Geist 字体下显得突兀,破坏界面的"轻"感。如果需要更强的强调,用更大的字号或 `foreground` 色值,而不是加粗。
**禁止** `font-bold` / `font-semibold`——任务管理工具追求信息密度和"轻"感,加粗会破坏层次节奏。如果需要更强的强调,用更大的字号或 `foreground` 色值,而不是加粗。
---