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

#86 Self host Google Fonts and Material Symbols #91

Closed

Conversation

coffeeandwork
Copy link
Collaborator

With this PR, Roboto font files and Material Symbols woff2 files will be loaded using relative urls to the location of beer.min.css file instead of relying on the Google hosted version as default behavior.

@coffeeandwork coffeeandwork marked this pull request as ready for review November 4, 2022 09:22
@coffeeandwork coffeeandwork changed the base branch from main to dev November 4, 2022 09:22
@coffeeandwork
Copy link
Collaborator Author

Resolves #86

@@ -1 +0,0 @@
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@0..1&family=Roboto:wght@300;400;500&display=swap");
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about the gone display: swap property?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Roboto Font related @import declarations in beer.css bring in the following css files:

  • node_modules/@fontsource/roboto/400.css
  • node_modules/@fontsource/roboto/500.css

Both of them have font-display: swap for all of the @font-face declarations. So we are good there.

For the material symbols, the file being brought in seems to be the following:

  • node_modules/material-symbols/index.css

This file uses font-display: block in its @font-face declarations which seems to be the default value of font-display.

I believe we do not want to use swap for symbols because there is no fallback font for them. If font-display: swap is used, then while the material symbols font file loads, the end-user will see un-ligatured text.

Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I’m not the repo owner, I cannot tell if these import changes go into the direction decided for beercss. So I will let @leonardorafael answer 😉

@coffeeandwork coffeeandwork marked this pull request as draft November 5, 2022 09:43
@coffeeandwork coffeeandwork deleted the gdpr_google_font_compliance branch December 9, 2022 09:11
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.

None yet

2 participants