font-performance
Skill11 starsChanged 11 days agoMITView on GitHub
Improve typography loading when web fonts delay text rendering, increase transfer size or cause layout shifts.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when custom fonts affect first render, layout stability, bandwidth or text readability.
- Distinctive: line 13
Remove unused families and weights.
- Distinctive: line 14
Use efficient formats such as WOFF2 and subset only when language and glyph coverage remain correct.
- Distinctive: line 18
Use unicode-range only when subsets are correctly generated and tested for all required scripts.
- Distinctive: line 23
Do not preload every weight or every language subset.
- Distinctive: line 24
Do not rely on a font-display setting to fix poor font selection or oversized files.
- Distinctive: line 25
Consider metric-compatible fallbacks and font metric overrides to reduce layout shifts.
- Distinctive: line 27
Verify diacritics, multilingual content, variable font axes and synthetic bold/italic behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Font Performance
Use this skill when custom fonts affect first render, layout stability, bandwidth or text readability.
Workflow
- Inventory font families, weights, styles, language coverage and actual usage.
- Remove unused families and weights. Prefer a small number of deliberate font files.
- Use efficient formats such as WOFF2 and subset only when language and glyph coverage remain correct.
- Define robust system fallback stacks and test line wrapping, weight and metrics before deployment.
- Choose font-display behavior deliberately. Use swap or optional based on product requirements and acceptable fallback behavior.
- Preload only a font file proven critical to above-the-fold rendering. Match its URL, type and crossorigin mode to the eventual request.
- Use unicode-range only when subsets are correctly generated and tested for all required scripts.
- Measure font transfer, request priority, text paint and layout shifts on mobile and desktop.
Engineering rules
- Do not preload every weight or every language subset.
- Do not rely on a font-display setting to fix poor font selection or oversized files.
- Consider metric-compatible fallbacks and font metric overrides to reduce layout shifts.
- Preserve readability when fonts fail or load slowly.
- Verify diacritics, multilingual content, variable font axes and synthetic bold/italic behavior.
- Respect font licensing and self-hosting requirements.
Deliverables
Provide font inventory, files removed or retained, preload rationale, fallback strategy, licensing notes and measured loading/layout impact.
Common AI failure mode
Failure: An agent swaps in a custom web font whose metrics differ substantially from the fallback, causing text blocks to reflow after the font loads.
Why it matters: Late changes in glyph widths and line metrics move headings, controls, and surrounding content, producing cumulative layout shift and disrupting reading position or interaction.
Symptoms:
- Text wraps to different lines after the web font loads.
- Headings or controls move vertically despite reserved image and media dimensions.
- The selected fallback has visibly different width or line-height metrics from the final font.
Prevention: Choose a metric-compatible fallback and use supported font metric overrides where appropriate. Load only required WOFF2 subsets and weights, preload only a measured critical font, and choose font-display deliberately. Measure layout shift and text paint on representative devices and verify multilingual glyph coverage and readability when the custom font is unavailable.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

