Privacy-focused Google Fonts alternative

Overview

Privacy-focused Google Fonts CDN alternative

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.

Latency test

(The colorful is my API, the grey is Google's API)

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?

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>

Currently, it only supports the css2 API endpoint.

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.
Comments
  • [bug] 500 error for special italic convention:

    [bug] 500 error for special italic convention: "ital@0;1"

    When generating <link>s for this font, you get a syntax convention that's new to me: "ital@0;1". :man_shrugging: Seems to fail on Cool's server.

    google's: https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap

    cool's: https://api.fonts.coollabs.io/css2?family=DM+Serif+Display:ital@0;1&display=swap

    {"statusCode":500,"error":"Internal Server Error","message":"undefined is not iterable (cannot read property Symbol(Symbol.iterator))"}
    
    opened by spencerflagg 5
  • Bug in some multiple requests

    Bug in some multiple requests

    First of all. Your project is fantastic and very useful. I'm trying to use it in our Picostrap Theme
    There is a lot of GDPR compliance concern regarding usage of Google Fonts on the web. Your solution is really clever and so much easier to implement, compared to locally hosting the fonts.

    Tinkering with your service I think I've found a bug. Some requests dealing with multiple fonts, when not including weights, apparently fail.

    One example: https://api.fonts.coollabs.io/css2?family=Playfair+Display&family=Josefin+Sans&display=swap

    Returns Playfair Display (correctly) and Montserrat(?)

    To compare, the corresponding Google URL, https://fonts.googleapis.com/css2?family=Playfair+Display&family=Josefin+Sans&display=swap works as expected.

    Thanks so much again for your project, and for your time looking into this.

    opened by jeff-at-livecanvas 4
  • Font API down?

    Font API down?

    Hello,

    Not sure what is happening, but it appears that any font other than Roboto is not served from the API. A few days ago, everything was working nicely, but today I noticed the fonts were not loading and visiting the links results in a 404.

    https://api.fonts.coollabs.io/css2?family=Roboto works, but not https://api.fonts.coollabs.io/css2?family=Merriweather or any other font I can think of.

    In any case, thank you for providing this privacy respecting alternative for fonts. 🙂

    opened by Correct-Syntax 2
  • Request with font weight not working

    Request with font weight not working

    This is not working for me (works with Google Fonts): https://api.fonts.coollabs.io/css2?family=Aguafina+Script:400&display=swap

    While this is working: https://api.fonts.coollabs.io/css2?family=Aguafina+Script&display=swap

    Is this a bug or is there anything else to consider, when loading font weights?

    opened by jploch 1
  • Typescript Implementation.

    Typescript Implementation.

    I've changed the code from .mjs to .ts. Also changed package commands.

      "scripts": {
        "start": "ts-node index.ts",
        "dev": "nodemon index.js",
        "tsc": "npx tsc --watch",
        "buil": "npx tsc"
      }
    
    opened by jareer12 0
  • build(deps): bump minimist from 1.2.5 to 1.2.6

    build(deps): bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Tutorial?

    Tutorial?

    I feel stupid but, how exactly do I do this?

    I've read the how to use but I still don't know.

    This isn't fully related to this, but Ideally I wanted to block all remote fonts on all websites and have my "locally hosted" (google) fonts take over, but I'm not sure if that's possible? I'm not sure how to "locally host" fonts. If that isn't possible, I would like to set this up instead.

    Can someone tell me if I even have the right way of thinking towards this stuff? Thanks.

    opened by zdat 0
  • in my hosts file

    in my hosts file

    Very cool! I like your thinking. All your documentation talks about when I am building a site how I can use Coollabs fonts instead of google's which is great.

    Something else I would like to do is put an IP address in my hosts file for google fonts:

    w.x.y.z fonts.googleapis.com w.x.y.z fonts.gstatic.com

    Is this possible? If yes, what IP address can be used?

    opened by justthisguy 0
  • [q&a] self-hosting questions

    [q&a] self-hosting questions

    1. Would you recommend self-hosting this server on a VPS?
    2. Would self-hosting from the same server as the website that consumes the font be a speed benefit? What if both Cool Fonts and the website that consumes it were hosted on the same Coolify instance?
    3. Am I correct in assuming that, to self-host this, I could pull it down to my own Gitlab and deploy it from there via my Coolify instance?

    Regardless - love this project! I was looking for something like this exactly when you were writing it, it seems. :)

    opened by spencerflagg 1
Owner
coolLabs
Control your digital footprint | Open-source & self-hostable applications and services built for your online safety.
coolLabs
Privacy Pass: a privacy-enhancing protocol and browser extension.

Privacy Pass Extension The Privacy Pass protocol is now being standardised by the privacypass IETF working group. All contributions are welcome! See t

Privacy Pass Team 1.1k Jan 7, 2023
📊🌍 Super small, light, privacy-focused, self-hostable web statistics provider

femtostats Update: It turns out Fathom Lite does everything I wanted to do except custom events for free, so I'm going to stop working on this for now

Ian Langworth ☠ 12 Nov 17, 2022
Google-Drive-Directory-Index | Combining the power of Cloudflare Workers and Google Drive API will allow you to index your Google Drive files on the browser.

?? Google-Drive-Directory-Index Combining the power of Cloudflare Workers and Google Drive will allow you to index your Google Drive files on the brow

Aicirou 127 Jan 2, 2023
Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.

Crayon Syntax Highlighter Supports multiple languages, themes, fonts, highlighting from a URL, local file or post text. Written in PHP and jQuery. Cra

Aram Kocharyan 1.1k Nov 26, 2022
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

A free and open source resume builder. Go to App What is this app all about? Reactive Resume is a free and open source resume builder that’s built to

Reactive Resume 9.7k Jan 3, 2023
Open source privacy notice design patterns.

Design-first privacy notice template The Juro Privacy Notice is an open source project by https://juro.com and https://stefaniapassera.com/. A couple

Juro 159 Nov 10, 2022
DecentraMix.io is a cross-chain, non-custodial, universal privacy-preserving protocol with the decentralized governance

DecentraMix.io is a cross-chain, non-custodial, universal privacy-preserving protocol with the decentralized governance. DecentraWorld applies zkSNARKs to enable transactional privacy for all DeFi components by breaking the on-chain link between depositor and recipient addresses.

DecentraWorld Ecosystem 65 May 7, 2022
Dapp example for airdropping ERC-20 tokens using World ID, preserving privacy for the claimers with zero-knowledge proofs.

World ID Example - Mesha Airdrop This repository contains an example decentralized application (dapp) for World ID. With Mesha Airdrop test airdroppin

Worldcoin 14 Dec 16, 2022
Privacy preserving governance mechanism using zero knowledge for proof of merkle inclusion.

Zero Knowledge Private Voting V1 Motivation On-chain governance today is fully transparent at the cost of privacy. This means that every proposal and

Blockchain Capital 18 Dec 16, 2022
Privacy First Toolbox For Developers 🧰

Dev Toolbox ?? A collection of tools for developers in one place Note This project is inspired and shares some code from tooling.one by @egoist which

Nafees Nazik 8 Nov 30, 2022
Privacy preserving governance mechanism using zero knowledge for proof of merkle inclusion.

Zero Knowledge Private Voting V1 Motivation On-chain governance today is fully transparent at the cost of privacy. This means that every proposal and

Blockchain Capital 11 Jun 7, 2022
Eigen ZK-ZKRollup, Low gas-fee, better privacy-enhancement, high composable

ZKZRU: Eigen ZK-ZKRollup Eigen ZK-ZKRollup provides confidential transaction for users with low gas cost. The ZK-Rollup is an extention of RollupNC an

Eigen Labs 25 Dec 22, 2022
YouPeriod.app -- the privacy-first period tracking app

YouPeriod.app The privacy-first period-tracking app. IMPORTANT: This app is still being developed. It's not ready for use yet, but will be soon. Pleas

Kyle Simpson 417 Dec 17, 2022
There can be more than Notion and Miro. Affine is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

AFFiNE.PRO The Next-Gen Knowledge Base to Replace Notion & Miro. Planning, Sorting and Creating all Together. Open-source, Privacy-First, and Free to

Toeverything 12.1k Jan 9, 2023
Lightweight privacy respecting geolocation library with no dependencies.

tzlocator Lightweight privacy respecting geolocation library with no dependencies. Key features ?? No third-party API calls ?? Works without browser p

null 13 Nov 15, 2022
🔐 A Privacy-first Diff tool for everyone. ✅ Your data never hits our servers.

Features ?? Privacy-first developer tool. ?? Run on your Web Browser, Your data is sent nowhere. ?? Find a Difference between two text input for Side

Proxyman 41 Dec 5, 2022
Always with personal privacy and anonymity in mind.

Clodbunker At the moment we aim to be a cutting-edge service that provides anonymous and secure cloud storage, with a strong focus on end-to-end encry

Cloudbunker 4 Mar 15, 2023
This is a simple script to upload Multiple files into google drive using google drive API and Nodejs.

Welcome to gDrive Multiple File Upload ?? This is a simple script to upload Multiple files into google drive using google drive API and Nodejs Install

Jayamal Sanuka Hettiarachchi 1 Dec 29, 2021
Google-reviews-crawler - A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file.

google-reviews-crawler A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file. Usage Clone the repo, install the de

￸A￸l￸e￸x D￸o￸m￸a￸k￸i￸d￸i￸s 6 Oct 26, 2022