Skip to main content

optimize-web-font-loading

Optimize web font loading for fast text, stable metrics, bounded files, and resilient fallback. Use when fonts delay rendering, shift layout, or fail across networks and scripts.

来源信息

仓库
protosphinx/sphinxstack
最近来源活动
2026年7月29日 13:55
检测到的 SKILL.md 语言
英语
星标
3
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
optimize-web-font-loading
category
web
description
Optimize web font loading for fast text, stable metrics, bounded files, and resilient fallback. Use when fonts delay rendering, shift layout, or fail across networks and scripts.
# optimize-web-font-loading Deliver only the faces needed and make fallback acceptable at every moment. ## Procedure 1. Inventory families, weights, styles, scripts, pages, licenses, and actual use. 2. Remove unused faces and subset only with verified language coverage. 3. Prefer modern compressed formats and same-origin delivery where practical. 4. Define preload only for critical above-fold faces and correct cross-origin behavior. 5. Choose `font-display` from the content and brand tradeoff. 6. Match fallback metrics to reduce reflow and preserve readable text. 7. Set immutable cache URLs, correct MIME, CORS, and versioning. 8. Test cold, warm, slow, offline, blocked-font, localization, and zoom cases. 9. Measure text render, layout shift, transfer, and cache reuse before and after. ## Guardrails - Do not subset away required languages or symbols. - Preloading every font competes with more critical resources. - Licensing terms remain part of deployment readiness. ## Done - A font inventory and delivery report records every retained face - Fallback, localization, failure, and cache cases are tested - Render timing and layout stability improvements are verified
在 GitHub 查看