Skip to content

Conversation

@celenityy
Copy link

- Improves privacy by preventing unwanted connections to third-parties, and prevents Google from tracking users (For reference, Google Fonts has been found to violate the GDPR: https://wptavern.com/german-court-fines-website-owner-for-violating-the-gdpr-by-using-google-hosted-fonts)
- Prevents the website from appearing ugly for users who block third party fonts
- Improves performance and reliability

Signed-off-by: celenity <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Aug 9, 2025

CLA assistant check
All committers have signed the CLA.

Signed-off-by: celenity <[email protected]>
Signed-off-by: celenity <[email protected]>
Copy link
Member

@lberrymage lberrymage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this change, thank you. My main comment is on how we should bundle and source the font files to facilitate 1) easily automated font version upgrades, 2) long-term caching and 3) keeping binary files out of source control.

Comment on lines +31 to +32
"src/material-icons.css",
"src/roboto.css",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be in "styles" (line 33) rather than "assets" so they can be minimized.

Comment on lines +135 to +136
"src/material-icons.css",
"src/roboto.css",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be in "styles" (line 140) rather than "assets" so they can be minimized.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all of the added font files, I think it would be best to keep the original file names and paths instead of creating our own for a couple of reasons:

  1. The original filenames are sufficiently randomized for cache busting, so if we use them we can cache the font files indefinitely. Google does this themselves: Cache-Control for the font files is set to 1 year.
  2. The original paths reflect that the upstream font files are versioned. We will want to update the font versions over time as part of our CI process, and if we simply replace the original files, we can no longer cache them indefinitely since browsers would never pick up the new versions.


<!doctype html>
<html lang="en">

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: These whitespace changes aren't really necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to find a way to pull in the font files during build time rather than vendoring them directly into the source repository. This could 1) help us automate version upgrades and 2) reduce the number of binary files we're checking into VCS. Perhaps we should look into something like Fontsource?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants