Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Use woff2 for all fonts #20

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

martin-brennan
Copy link
Contributor

@martin-brennan martin-brennan commented Jan 29, 2025

We are changing to use woff2 instead of ttf for all our
fonts. This is supported on all browsers we support
(see https://caniuse.com/woff2) and it's faster and a
smaller file size.

This results in an ~16MB total size reduction for fonts
we package with Discourse. Most fonts are 50-75%
smaller so that helps a lot with general initial page load.
The worst offender was Noto Sans JP, which was 4MB per
font file.

@martin-brennan martin-brennan force-pushed the dev/convert-to-using-woff2 branch from 342c0d7 to dbaac6f Compare January 29, 2025 06:07
@martin-brennan martin-brennan marked this pull request as ready for review January 29, 2025 06:15
@martin-brennan martin-brennan force-pushed the dev/convert-to-using-woff2 branch from dbaac6f to ae888e7 Compare January 29, 2025 06:18
We are changing to use woff2 instead of ttf for all our
fonts. This is supported on all browsers we support
(see https://caniuse.com/woff2) and it's faster and a
smaller file size.

This results in an Xkb total size reduction for fonts
we package with Discourse.
@martin-brennan martin-brennan force-pushed the dev/convert-to-using-woff2 branch from ae888e7 to c867327 Compare January 29, 2025 06:25
@martin-brennan martin-brennan merged commit 73865ca into main Jan 30, 2025
3 checks passed
@martin-brennan martin-brennan deleted the dev/convert-to-using-woff2 branch January 30, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants