The motivation for this project are legal verdicts passed in germany that stated the use of google fonts illegal in germany for privacy reasons. The idea is to host fonts on your own, but instead of renting actual servers to implement the logic on googles font systems that provide pre-configured css bundles with font references at runtime, the css bundles are generated at compile time in a github action run once and then served statically.
How it works:
<link>
tag on the google fonts page, and copy the href target, e.g.
https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;900&display=swap
fonts
file at the root of the repo, such as:bundlename: https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;900&display=swap
another-bundle: https://fonts.googleapis.com/css2?family=Roboto:wght@100&family=Titillium+Web:wght@300&display=swap
https//your-github-user-name.github.io/your-repo-name/bundlename.css
Example: https://lukasbach.github.io/gfont-cloudless/example-bundle.css
That's it!