fix: 系统性解决青柳隶书体'份'字不显示的问题

根本原因:
- 青柳隶书体字体文件中'份'字(U+4EFD)的绘制指令数量为0
- 虽然字符映射表包含该字符,但字形数据为空,导致无法渲染

解决方案:
- 修改CSS字体回退链,添加Ma Shan Zheng作为主要回退字体
- 当青柳隶书体无法渲染'份'字时,浏览器自动使用Ma Shan Zheng字体
- 保持青柳隶书体的整体风格,同时确保所有字符都能正常显示

修改文件:
- src/app/globals.css: 更新.font-calligraphy类的字体回退链
- src/components/sections/home-solutions-section.tsx: 恢复使用font-calligraphy类

验证结果:
- 字体文件分析确认'份'字绘制指令数量为0
- Ma Shan Zheng字体包含完整的'身'和'份'字绘制数据
- 本地测试验证'身份'两个字都能正常显示
This commit is contained in:
张翔
2026-04-22 07:49:09 +08:00
parent 9be474b06b
commit 4066c82939
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -20,7 +20,11 @@
} }
.font-calligraphy { .font-calligraphy {
font-family: var(--font-aoyagi-reisho), 'STKaiti', 'KaiTi', serif !important; font-family: var(--font-aoyagi-reisho), 'Aoyagi Reisho', var(--font-ma-shan-zheng), 'Ma Shan Zheng', var(--font-long-cang), 'Long Cang', 'ZCOOL XiaoWei', 'STKaiti', 'KaiTi', serif !important;
font-weight: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
} }
@theme inline { @theme inline {
@@ -46,7 +46,7 @@ export function HomeSolutionsSection() {
className="text-center max-w-3xl mx-auto mb-16" className="text-center max-w-3xl mx-auto mb-16"
> >
<h2 id="solutions-heading" className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6"> <h2 id="solutions-heading" className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6">
<span className="text-[#C41E3A] font-bold"></span> <span className="text-[#C41E3A] font-calligraphy"></span>
</h2> </h2>
<p className="text-lg text-[#5C5C5C]"> <p className="text-lg text-[#5C5C5C]">