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

Self-host "Roboto" font assets #1949

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamzap
Copy link
Member

@adamzap adamzap commented Feb 13, 2025

This change ends the project's reliance on Google Fonts as a remote font asset host.

Roboto is released under the SIL Open Font License, Version 1.1: https://github.com/googlefonts/roboto-3-classic/?tab=OFL-1.1-1-ov-file

The license provides an FAQ about web hosting for further reading: https://openfontlicense.org/ofl-faq/#2nbspnbspnbspusing-ofl-fonts-for-webpages-and-online-webfont-services

The initial TTF font files were downloaded from GitHub: https://github.com/googlefonts/roboto-3-classic/releases/tag/v3.010

Then I ran ftcli converter ft2wf --flavor woff2 on the files from the web directory to generate woff2 files: https://ftcli.github.io/FoundryTools-CLI/commands/ftcli_converter.html#ftcli-converter-ft2wf

Closes #1003.

I think we'll want to fix #1881 before this is merged.

@@ -39,10 +39,6 @@

<title>{% block title %}The web framework for perfectionists with deadlines{% endblock %} | Django</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
Copy link
Member Author

Choose a reason for hiding this comment

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

If we parse the ital,wght@0,300;0,400;0,700;1,400;1,700 part of the URL, we get the following font variants:

  1. Light (not italic, weight 300)
  2. Regular (not italic, weight 400)
  3. Bold (not italic, weight 700)
  4. (Regular) Italic (italic, weight 400)
  5. Bold Italic (italic, weight 700)

This change ends the project's reliance on Google Fonts as a remote font
asset host.

Roboto is released under the SIL Open Font License, Version 1.1:
https://github.com/googlefonts/roboto-3-classic/?tab=OFL-1.1-1-ov-file

The initial TTF font files were downloaded from GitHub:
https://github.com/googlefonts/roboto-3-classic/releases/tag/v3.010

Then I ran `ftcli converter ft2wf --flavor woff2` on the files from the
`web` directory to generate `woff2` files:
https://ftcli.github.io/FoundryTools-CLI/commands/ftcli_converter.html
@adamzap adamzap force-pushed the self-host-roboto-font branch from 506edd5 to e7ab2f6 Compare February 13, 2025 17:02
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.

Icons fail to load Remove Google Fonts
2 participants