跳到正文
Skillpedia
界面(UI/UX)75k · #3085

webfont-format

它能做什么

这个技能检查网站加载的字体文件,并建议更快的格式和加载设置。它面向关心页面速度的设计师和开发者。

适用场景

  • ✓网站加载的旧版字体格式比实际需要大的时候。
  • ✓字体加载期间文字一直不可见的时候。
  • ✓性能审计显示字体文件拖慢首屏显示的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/webfont-format/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/webfont-format/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的网站使用了几种自定义字体,文字出现得很慢。请帮我让字体加载得更快吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查样式表中的字体格式和 font-display 设置。它会建议使用带备用方案的 WOFF2、预加载关键字体,并去掉未使用的字符。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Optimize web font formats

Modern font formats reduce file sizes by 30-50%—directly improving page load speed and Core Web Vitals scores.

Quick Reference

  • Use WOFF2 as primary format (~30% smaller than WOFF)
  • Include WOFF fallback for older browsers
  • Apply font-display: swap for better perceived performance
  • Preload critical fonts and subset to reduce file sizes

Check

Verify that web fonts use modern formats (WOFF2, WOFF) with proper fallbacks and are optimized for performance with font-display and preloading strategies.

Fix

Convert fonts to WOFF2/WOFF formats, implement proper font loading strategies, and optimize font delivery with compression and caching.

Explain

Explain how modern web font formats reduce file sizes, improve loading performance, and provide better browser support compared to legacy formats.

Code Review

Review stylesheets, component styles, and responsive states related to Optimize web font formats. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/webfont-format

常见问题

为什么优先使用 WOFF2?

这个技能说,WOFF2 大约比 WOFF 小 30%,因此下载更快。

font-display: swap 有什么作用?

它会立即显示备用文字,并在自定义字体准备好后替换为它。

什么是字体子集化?

它只保留你需要的字符,从而让字体文件更小。

详情

作者的原始描述

Use when reviewing stylesheets, component styles, and responsive behavior related to Optimize web font formats. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3085
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能