MCPcopy Index your code
hub / github.com/coollabsio/fonts

github.com/coollabsio/fonts @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
32 symbols 93 edges 7 files 0 documented · 0% 12 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

A privacy-friendly drop-in replacement for Google Fonts

I wrote it in an hour, so please report bugs here. Several improvements could be made here and there, so do not hesitate to contact me. if you have any suggestions.

Why?

There have been several GDPR issues popping up lately with Google & Google CDN. We don't know what they are doing with user details, such as IP address, browser agent, etc.

So I decided to create a similar service just without logging ANYTHING.

How to use?

Fonts

Change the domain name from fonts.googleapis.com to api.fonts.coollabs.io in your <head> tag; that's it!

Example:

Original <head> content:

<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&display=swap" rel="stylesheet" />

Replaced <head> content:

<link rel="preconnect" href="https://api.fonts.coollabs.io" crossorigin />
<link href="https://api.fonts.coollabs.io/css2?family=Roboto&display=swap" rel="stylesheet" />

Or with @import:

From:

<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
</style>

To:

<style>
@import url('https://api.fonts.coollabs.io/css2?family=Roboto&display=swap');
</style>

Supports css2 API endpoint and css API endpoint as well.

Icons

Currently, Material Icons is supported.

Original <head> content:

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />

Replaced <head> content:

<link rel="preconnect" href="https://api.fonts.coollabs.io" crossorigin />
<link href="https://api.fonts.coollabs.io/icon?family=Material+Icons" rel="stylesheet" />

Stack

  • The API is a simple HTTP server (written in Node.js/Fastify), that is open-sourced and does not log anything, hosted with a coolify instance on a Hetzner server.
  • Fonts are served from BunnyCDN, which has an option to disable logging on their side completely.

Core symbols most depended-on inside this repo

logProgress
called by 6
gather-fonts.mjs
fetchWithRetry
called by 4
gather-fonts.mjs
logProgress
called by 4
deprecated/gather-fonts-old.mjs
formatTime
called by 3
gather-fonts.mjs
formatTime
called by 3
deprecated/gather-fonts-old.mjs
saveVersionCache
called by 2
gather-fonts.mjs
normalizeFileName
called by 2
gather-fonts.mjs
getWoff2UrlsForAllSubsets
called by 2
gather-fonts.mjs

Shape

Function 32

Languages

TypeScript100%

Modules by API surface

gather-fonts.mjs13 symbols
deprecated/gather-fonts-old.mjs8 symbols
deprecated/css2-next.mjs4 symbols
css2.mjs3 symbols
css2.test.mjs2 symbols
css.mjs2 symbols

For agents

$ claude mcp add fonts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact