This utility helps create CSS files to load your fonts from a mirror of Google Fonts from Google Font links.
Find a file
2023-05-15 23:16:34 +02:00
src Fix font rendering on results 2023-05-15 23:16:34 +02:00
.gitignore Initial commit 2023-05-15 20:17:18 +02:00
index.html Add viewport meta tag 2023-05-15 22:05:44 +02:00
package.json Initial commit 2023-05-15 20:17:18 +02:00
README.md Initial commit 2023-05-15 20:17:18 +02:00
svelte.config.js Initial commit 2023-05-15 20:17:18 +02:00
tsconfig.json Initial commit 2023-05-15 20:17:18 +02:00
tsconfig.node.json Initial commit 2023-05-15 20:17:18 +02:00
vite.config.ts Initial commit 2023-05-15 20:17:18 +02:00

GFonts Mirror Interface

I need a better name :p

This utility helps create CSS files to load your fonts from a mirror of Google Fonts from Google Font links.

Usage

  1. Go to gfonts.sofiaritz.com.
  2. Enter your Mirror URL (an Internet-accesible clone of the Google Fonts repo).
    • If your site has low-traffic, feel free to use my mirror :)
  3. Click the Transform button and the CSS will be generated for you!
    • You can use the Copy code button, but sometimes it fails, so keep that in mind!

Self-hosting

Google Fonts Mirror

Creating a Google Fonts mirror is an easy task. You need the following:

  1. A reliable server (e.g. a VPS).
  2. git.
  3. A way to host the files (Caddy, NGINX, Apache HTTP Server, etc.)
  4. (Technically this is not a requirement, but you should use one anyway) A domain.

Then follow the following steps:

  1. Run git clone https://github.com/google/fonts --branch main --single-branch --depth 1 [folder]
    • [folder] should be replaced with the folder where you will save the mirror.
    • This is just a shallow clone of the repo. You can just git clone the repo, but it's not recommended due to disk and bandwidth usage.
  2. Serve the files somewhere.
  3. Check that the mirror works by accessing the [root]/README.md
    • [root] should be replaced with your domain + the path where it's served (for example, cdn.sofiaritz.com/fonts).
    • If everything is working, a README.md file like this one should be downloaded.
  4. (Optional) Create a index.html file.
    • You can create a index.html file with something you want to tell about the mirror at [folder].
    • For example, check cdn.sofiaritz.com/fonts.
      • I use that page to teach the users about the dangers of services like Google Fonts, how I handle personal data and my contact information.

GFonts Interface

  1. Run yarn build.
  2. Follow step 2 of Self-hosting § Google Fonts Mirror with the dist/ folder.

Contributing

Feel free to contribute to this project! Create an account on my git server, open an issue or a PR, and I'll make sure to review it as soon as possible :)

You can also send me the diff or use git-send-email.

Notes

  • Make sure to delete your yarn.lock when a new pb-parser commit is pushed.

Decentralization

Right now the only instance of this interface is mine, and the only Google Fonts mirror that I know is mine.

I try to maintain everything and help everyone to achieve decentralization, but at the end of the day I'm just a random woman.

Do you have a Google Fonts mirror? Please, contact me!

Do you have another instance of this interface? Please, contact me!