feat(typography): 首批 6 字族落地(新增汇文明朝/站酷快乐)+ 13 款候补清单

- 新增两款自托管字族:font-huiwen(汇文明朝体,文风开源 cn-font-split
  339 片切片包,用到页 +535KB、按需拉取实测 19/339 片)|font-kuaile
  (站酷快乐体 +163KB)——补齐「宋明气质」与「轻松标题」两个字体缺口
- 首批 6 族全部 OFL-1.1 且允许 web 嵌入;未用字体的页面增量恒 +0.0KB
  (按页子集化生效)
- 候补 13 款逐款标注「许可证 + web 嵌入」:HarmonyOS Sans/MiSans/OPPO
  Sans/阿里普惠体(免费商用 + 明确允许嵌入,但 npm 无包/整包过大)、
  得意黑/更纱/站酷高端黑/花园明朝(OFL 但无可用 npm 分发)、霞鹜文楷
  Light(+8605KB 否决)、演示悠然小楷("个人免费"常禁 @font-face,风险)
- docs 写入「加字四步流程」(核双授权 → 装包或放 public/fonts → 加类+
  白名单+面板项 → 跑体积账)
- 可视化面板 35 项(10 字族 + 25 颜色);白名单放行 10 字族类
- 资产:public/fonts/hwmc(339 woff2 13MB + fonts.css 162KB)入仓

车道:op-artalk;收编复验:构建 48 页、E2E 37/37、两款新字体 computed
与切片按需加载实测(hwmc/27、52 等 20 个请求)

验证: pnpm astro build 48 页 exit 0;E2E 37/37;playwright 新字体 computed
      + 字体请求观测

Spec: none (字体扩展,车道级交付)

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-11-02 17:47:13 +08:00
1 parent 26bbb66a72
commit 3822e150a8
348 files changed
+85 -12

No files matched your search

+4
View File
@@ -7,6 +7,7 @@ import mono400 from '@fontsource/jetbrains-mono/400.css?url';
import mono700 from '@fontsource/jetbrains-mono/700.css?url';
import serifVar from '@fontsource-variable/noto-serif-sc/index.css?url';
import kai from 'lxgw-wenkai-screen-webfont/lxgwwenkaiscreen.css?url';
import kuaile from '@fontsource/zcool-kuaile/index.css?url';
import '../styles/global.css';
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
@@ -74,6 +75,9 @@ const canonicalUrl = new URL(withSlash(rawPath), Astro.site).href;
<>
<link rel="preload" as="style" href={serifVar} onload="this.rel='stylesheet'" />
<link rel="preload" as="style" href={kai} onload="this.rel='stylesheet'" />
<link rel="preload" as="style" href={kuaile} onload="this.rel='stylesheet'" />
<!-- 汇文明朝(OFL-1.1,文风开源切片包 339 片,按 unicode-range 按需拉取) -->
<link rel="preload" as="style" href="/fonts/hwmc/fonts.css" onload="this.rel='stylesheet'" />
</>
)}
<noscript>
+2
View File
@@ -44,6 +44,8 @@ const ALLOWED = new Set([
'font-kai-sys',
'font-hei-sys',
'font-fangsong',
'font-huiwen',
'font-kuaile',
// 文学排版
'drop-cap',
'quote-line',
+6
View File
@@ -210,6 +210,12 @@ pre code { background: none; border: none; padding: 0; font-size: inherit; }
.prose-reading .font-hei-sys, .prose-tech .font-hei-sys {
font-family: "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.prose-reading .font-huiwen, .prose-tech .font-huiwen {
font-family: 'WF-Hwmc', var(--font-serif);
}
.prose-reading .font-kuaile, .prose-tech .font-kuaile {
font-family: 'ZCOOL KuaiLe', var(--font-serif);
}
.prose-reading .font-fangsong, .prose-tech .font-fangsong {
font-family: FangSong, STFangsong, "FangSong_GB2312", serif;
}