Skip to main content
Checks for font loading best practices
Rule IDperf/font-loading
CategoryPerformance
ScopePer-page
Severitywarning
Weight5/10

Solution

Optimize font loading to prevent FOIT (Flash of Invisible Text) and FOUT (Flash of Unstyled Text): 1) Use font-display: swap in @font-face to show fallback text immediately. 2) Preconnect to font CDNs with <link rel='preconnect'>. 3) Use WOFF2 format for best compression. 4) Self-host fonts when possible for faster loading. 5) Limit font families and weights to reduce downloads.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["perf/font-loading"]

Disable all Performance rules

squirrel.toml
[rules]
disable = ["perf/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["perf/font-loading"]
disable = ["*"]