https://github.com/lukasbach/gfont-cloudless
repo template for self-hosting google fonts without relying on google host servers
https://github.com/lukasbach/gfont-cloudless
font gdpr google legal privacy selfhosted
Last synced: about 1 month ago
JSON representation
repo template for self-hosting google fonts without relying on google host servers
- Host: GitHub
- URL: https://github.com/lukasbach/gfont-cloudless
- Owner: lukasbach
- Created: 2022-07-14T22:17:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T15:10:53.000Z (2 months ago)
- Last Synced: 2025-03-21T13:12:54.281Z (about 2 months ago)
- Topics: font, gdpr, google, legal, privacy, selfhosted
- Language: JavaScript
- Homepage:
- Size: 156 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# gfont-cloudless
> A small automated repo template for self-hosting google fonts without relying on google host servers.
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:
- [Fork this repo](https://github.com/lukasbach/gfont-cloudless/generate) and setup Github Pages on your fork
- Go to [fonts.google.com](https://fonts.google.com/) and configure a font bundle
- Export a `` 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`
- Add the link alongside a key into the `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
```- Push the repo, and import the css file `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!