new_audit(fonts): recommend serving fonts as WOFF2 - #17152
Open
filchakov wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
Hi @connorjclark, Whenever you have some free time, would you mind reviewing this quick PR for issue #16543? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
modern-font-formatsbyte-efficiency audit that recommends serving loaded TTF, OTF, and WOFF fonts as WOFF2.The audit:
Motivation
The Web Almanac 2025 Fonts chapter reports that WOFF, TTF, and OTF are still used for a meaningful share of font requests:
WOFF2 can reduce font transfer sizes without changing the font's functionality. This audit makes that opportunity visible and actionable in Lighthouse without downloading font response bodies or performing conversions during a
run.
Estimated savings
Savings are based on the paired original, WOFF1, and WOFF2 sizes published in the W3C WOFF 2.0 Evaluation Report.
For TTF and OTF, the estimate is calculated per font as:
Testing
Added unit coverage for:
Added end-to-end coverage to the existing perf-fonts smoke fixture using a loaded TTF font.
Validation completed:
Related Issues/PRs
Related to #16543.