perf(game): 预加载 Zpix 字体,减少 FOUT 跳动 - #36
Merged
Merged
Conversation
为 game.html 添加 preconnect + preload,让 Zpix woff2 在 HTML 解析阶段 即开始并行下载,缩小 font-display:swap 的回退渲染窗口。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
建议暂无额外建议。 结论:✅ 可以合并 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Performance
perf(game): 为 game.html 添加<link rel="preconnect">和<link rel="preload">提前下载 Zpix 像素字体 woff2,减少font-display: swap回退渲染窗口(FOUT 跳动)Pre-Landing Review
No issues found. Diff: 2 lines (HTML
<link>tags with correctcrossoriginandas="font"attributes).Design Review
No visual changes — preload is metadata-only.
Adversarial Review
Claude subagent: informational — no SRI
integrityon jsDelivr URL (theoretical supply-chain risk, non-blocking for a pixel font). Recommendation: ship as-is.Test plan
<link rel="preload" as="font" type="font/woff2" crossorigin>correct syntaxcrossoriginattribute consistent with@font-faceanonymous CORS modepreconnectto cdn.jsdelivr.net correctly added alongside preload🤖 Generated with Claude Code