chore: 上线前测试修复与部署配置更新

- fix(test): 添加 useSearchParams mock,修正联系链接断言
- style(nav): 将"联系我们"改为"联系"
- chore(deploy): 更新 Nginx 配置和部署文档
- style(logo): 更新 Logo SVG 文件
- feat(scripts): 添加字体处理和站点配置脚本
This commit was merged in pull request #9.
This commit is contained in:
张翔
2026-04-22 20:17:13 +08:00
parent 84f488a253
commit 96dddeb20b
20 changed files with 1300 additions and 560 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""对比两个字体文件"""
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables import _h_m_t_x, _g_a_s_p
original_hmtx = _h_m_t_x.table__h_m_t_x.decompile
def patched_hmtx(self, data, ttFont):
try: return original_hmtx(self, data, ttFont)
except: self.metrics = {}
_h_m_t_x.table__h_m_t_x.decompile = patched_hmtx
original_gasp = _g_a_s_p.table__g_a_s_p.decompile
def patched_gasp(self, data, ttFont):
try: return original_gasp(self, data, ttFont)
except: self.gaspRanges = {}
_g_a_s_p.table__g_a_s_p.decompile = patched_gasp
print('=== public/fonts/AoyagiReisho.ttf ===')
f1 = TTFont('public/fonts/AoyagiReisho.ttf')
cmap1 = f1.getBestCmap()
print('U+9060 遠:', 0x9060 in cmap1)
print('U+8fdc 远:', 0x8fdc in cmap1)
print('字形数:', len(f1.getGlyphOrder()))
print('GSUB:', 'GSUB' in f1)
f1.close()
print()
print('=== src/app/fonts/AoyagiReisho.ttf ===')
f2 = TTFont('src/app/fonts/AoyagiReisho.ttf')
cmap2 = f2.getBestCmap()
print('U+9060 遠:', 0x9060 in cmap2)
print('U+8fdc 远:', 0x8fdc in cmap2)
print('字形数:', len(f2.getGlyphOrder()))
print('GSUB:', 'GSUB' in f2)
f2.close()