txw/txw-mhzc-web/public/docs/font-design-package/audit/当前实现对照.md

42 lines
1.7 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.

# 字体实现现状审计
导出日期2026-05-20
## 一、三套来源并存
| 来源 | 字体栈 | 影响范围 |
| --- | --- | --- |
| `theme.css` | pingfang sc, microsoft yahei, arial | TDesign 组件 |
| `tailwindcss.css` body | Inter, system-ui | 未写 font-family 的全局文本 |
| 各 `.vue` 手写 | PingFang SC / Inter / SimHei / 方正正黑 | 首页、导航、出海页等 |
## 二、主要文件对照
| 文件 | 当前写法 |
| --- | --- |
| `assets/css/theme.css` | `--td-font-family` 苹方栈(规范) |
| `assets/css/tailwindcss.css` | `body { font-family: Inter... }`**冲突** |
| `components/new-nav/index.vue` | PingFang SC, 16px/14px |
| `components/nav/index2.vue` | PingFang SC |
| `views/home2/index.vue` | PingFang SC + FZZhengHeiS + SimHei + Inter |
| `views/qych/index.vue` | PingFang SC, Microsoft YaHei |
| `views/ggwhglHtgl/*` | PingFang SC, Microsoft YaHei, Arial Regular |
## 三、风险
1. 同一屏内中英文混排时 Inter 与苹方度量不一致,行高可能不齐。
2. 设计交付若按苹方标注,开发在 Inter 环境预览会产生偏差。
3. 方正正黑、黑体未全局声明 `@font-face`,依赖用户本机是否安装。
## 四、建议统一步骤
1. `body` 改为 `var(--page-font-family)`(见 `tokens/font-tokens.css`
2. `main.js` 引入 `font-tokens.css` 或合并进 `page-layout.less`
3. 新代码禁止写 `font-family: PingFang SC`,改用 class 或 mixin
4. 展示字白名单:`--page-font-family-display` 仅用于 Banner
## 五、本包不含内容
-`.ttf` / `.woff` / `.woff2` 字体文件(版权与体积考虑)
- 若设计需离线包,请向字体厂商购买并单独交付安装说明