txw/txw-mhzc-web/public/docs/font-design-package/README.md

47 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 门户字体设计包txw-mhzc-web
| 属性 | 内容 |
| --- | --- |
| 版本 | v1.0 |
| 导出日期 | 2026-05-20 |
| 适用项目 | txw-mhzc-web / 门户 index 子应用 |
| 说明 | 本包为**设计规范与 CSS Token**,不含可分发字体文件(苹方、雅黑等为系统/授权字体) |
## 包内文件
| 文件 | 说明 |
| --- | --- |
| `字体设计规范.md` | 主文档:字体族、字号阶梯、行高、使用场景、统一建议 |
| `tokens/font-tokens.css` | 可直接引入的 CSS 变量(推荐全站统一方案) |
| `tokens/font-tokens.less` | Less 变量版本 |
| `export/theme-font-excerpt.css` | 工程内 TDesign `theme.css` 字体段摘录 |
| `audit/当前实现对照.md` | 代码现状与不一致项清单 |
| `samples/typography-preview.html` | 浏览器打开可预览字号阶梯 |
## 快速使用(开发)
```html
<!-- 在入口前引入 -->
<link rel="stylesheet" href="./tokens/font-tokens.css" />
```
```less
@import './tokens/font-tokens.less';
.portal-title {
font: var(--page-font-headline-medium);
}
```
```css
body {
font-family: var(--page-font-family);
}
```
## 推荐统一字体栈
**PingFang SC → Microsoft YaHei → Arial → sans-serif**
`theme.css``--td-font-family` 对齐;勿在 `body` 使用 Inter 作为默认(当前 `tailwindcss.css` 存在冲突,见审计文档)。