fix: 修复字体加载警告和Logo图片宽高比问题
## 修复内容 ### 字体优化 - 创建 AoyagiReisho-subset.ttf 子集字体,仅包含"睿新致远"4个字符 - 文件大小从 4.4MB 减小到 5KB(99.9% 减少) - 修复 vmtx 表解析错误导致的 48 个控制台警告 ### Logo 图片修复 - 修复 Logo SVG 宽高比问题(原始 480x120,4:1 比例) - Header: width=128 height=32 - Footer: width=192 height=48 - 消除 Next.js Image 组件警告 ### 其他优化 - 简化字体加载逻辑 - 更新部署配置 ## 测试结果 - 32 个回归测试全部通过 - 0 个控制台警告 - 0 个错误
This commit was merged in pull request #7.
This commit is contained in:
@@ -43,13 +43,13 @@ describe('useFontLoading', () => {
|
||||
writable: true,
|
||||
});
|
||||
|
||||
const { result } = renderHook(() => useFontLoading('Aoyagi Reisho'));
|
||||
const { result } = renderHook(() => useFontLoading('Ma Shan Zheng'));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(result.current).toBe(true);
|
||||
});
|
||||
|
||||
expect(mockLoad).toHaveBeenCalledWith('1em "Aoyagi Reisho"');
|
||||
expect(mockLoad).toHaveBeenCalledWith('1em "Ma Shan Zheng"');
|
||||
});
|
||||
|
||||
it('should return true when font loading fails', async () => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export function useFontLoading(fontFamily: string = 'Aoyagi Reisho') {
|
||||
export function useFontLoading(fontFamily: string = 'Ma Shan Zheng') {
|
||||
const [isLoaded, setIsLoaded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user