web-font-optimization

Optimize web font delivery with WOFF2 self-hosting and preload strategies.

2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/coastdigitalgroup/coastai-skills --skill web-font-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-font-optimization
Source: https://github.com/coastdigitalgroup/coastai-skills/tree/main/website-development/web-font-optimization
Command: npx skills add https://github.com/coastdigitalgroup/coastai-skills --skill web-font-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Delivers typography efficiently by optimizing font loading to reduce CLS, improve text visibility, and boost perceived performance.

Core Features & Use Cases

  • Self-host fonts in WOFF2 for privacy and performance.
  • Create robust @font-face declarations with font-display: swap and proper font-weight mapping.
  • Audit, subset, and preload fonts to minimize impact on critical rendering path.
  • Use cases include replacing third-party fonts with self-hosted assets, improving LCP, and reducing layout shifts during font load.

Quick Start

Run the font optimization workflow on your project to inline critical font assets and configure preloads for immediate text visibility.

Frequently Asked Questions about web-font-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize web fonts to reduce CLS and improve page speed?

Optimize web fonts by self-hosting WOFF2 assets, configuring @font-face declarations with font-display: swap, and preloading critical fonts to reduce layout shifts and boost perceived performance.

What is the best way to prevent layout shifts when loading custom fonts?

Preventing layout shifts requires setting font-display: swap in your @font-face rules and preloading critical font assets to ensure immediate text visibility without disrupting the critical rendering path.

How do I self-host web fonts to improve LCP and text visibility?

Self-host web fonts by replacing third-party font links with local WOFF2 files, mapping proper font-weight declarations, and configuring preload strategies to improve Largest Contentful Paint.

Does preloading fonts eliminate FOUT and FOIT issues during page load?

Preloading fonts combined with font-display: swap mitigates FOUT and FOIT issues by prioritizing font fetching and ensuring text remains visible during the loading process.

When should I subset fonts for web performance optimization?

Subset fonts when replacing third-party assets with self-hosted WOFF2 files to minimize payload size and reduce the impact on critical rendering paths for faster page loads.