Skip to content

fb-sean/font-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📁 Font Server

A blazing fast, minimal font server built with raw node:http and axios.
Includes a smart TypeScript Google Fonts Proxy with caching and support for Hetzner Storage Box (currently WIP).


✨ Features

  • ⚡️ Pure Node.js – no frameworks, just node:http
  • 🧠 Google Fonts Proxy – downloads fonts on-demand and caches them locally
  • 💾 File Cache – serve files instantly if already cached
  • ☁️ Hetzner Storage Box integration (planned, currently not working)
  • 🛠 Built with TypeScript

🔧 Setup

Build

npm run build

Run

npm run start

Replace

src: url(https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');

=>

src: url(https://example.com/fetch/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');

OR

<link type="text/css" href="//example.com/search?family=Google%20Sans%20Text%3A400%2C500%2C700" rel="stylesheet">

🌐 Google Fonts Proxy

Send a request like:

GET /fetch/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2

The server will:

  1. Check if the font is cached
  2. If not, download it from Google Fonts
  3. Store it locally
  4. Serve it from the local cache next time 🚀

📦 Hetzner Storage Box (WIP)

There's built-in code to store files in a Hetzner Storage Box.
Currently not active due to connection/auth issues, contributions welcome!


🤝 Contributions

Contributions are welcome!
Feel free to open issues, suggest features or submit PRs.


💬 Contact

Have questions or ideas?
Open an issue or ping me!

About

A simple font server for serving fonts to the web.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published