Awesome Open Source
Awesome Open Source


A Hassle-Free Way to Self-Host Google Fonts

This service might be handy if you want to directly download all .eot, .woff, .woff2, .svg, .ttf files of a Google font (normally your User-Agent would determine the best format at Google's CSS API). Furthermore it provides charset customization and CSS snippets, hence getting your fonts ready for local hosting should be finally a breeze.

Give it a try: google-webfonts-helper hosted on Heroku

pic running


The API is public, feel free to use it directly.

GET /api/fonts

Returns a list of all fonts, sorted by popularity. E.g. curl

  "id": "open-sans",
  "family": "Open Sans",
  "variants": ["300", "300italic", "regular", "italic", "600", "600italic", "700", "700italic", "800", "800italic"],
  "subsets": ["devanagari", "greek", "latin", "cyrillic-ext", "cyrillic", "greek-ext", "vietnamese", "latin-ext"],
  "category": "sans-serif",
  "version": "v10",
  "lastModified": "2014-10-17",
  "popularity": 1,
  "defSubset": "latin",
  "defVariant": "regular"
} [...]

GET /api/fonts/[id]?subsets=latin,latin-ext

Returns a font with urls to the actual font files google's servers. subsets is optional (will serve the defSubset if unspecified). E.g. curl ",latin-ext" (the double quotes are important as query parameters may else be stripped!):

  "id": "modern-antiqua",
  "family": "Modern Antiqua",
  "variants": [{
    "id": "regular",
    "eot": "",
    "fontFamily": "'Modern Antiqua'",
    "fontStyle": "normal",
    "fontWeight": "400",
    "woff": "",
    "local": ["Modern Antiqua Regular", "ModernAntiqua-Regular"],
    "ttf": "",
    "svg": "",
    "woff2": ""
  "subsets": ["latin", "latin-ext"],
  "category": "display",
  "version": "v6",
  "lastModified": "2014-08-28",
  "popularity": 522,
  "defSubset": "latin",
  "defVariant": "regular",
  "subsetMap": {
    "latin": true,
    "latin-ext": true
  "storeID": "latin-ext_latin"

GET /api/fonts/[id]?download=zip&subsets=latin&formats=woff,woff2&variants=regular

Download a zipped archive with all .eot, .woff, .woff2, .svg, .ttf files of a specified font. The query parameters formats and variants are optional (includes everything if no filtering is applied). is E.g. curl -o ",latin-ext&variants=regular,700&formats=woff" (the double quotes are important as query parameters may else be stripped!)


This service was originally a prototype I've created to get familiar with Angular and Express. All magic by generator-angular-fullstack. See my note here.

Idea originally by Clemens Lang who created an awesome bash script to download Google fonts in all formats.


Everything is welcome, especially tests! Fork, change and send me a pull request. However, please add a description to your changes, not only code!

Attention designers: Searching for a logo and proper styling (I'm more a usability / backends guy).


(c) Mario Ranftl MIT License

Google Fonts Open Source Font Attribution

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,076,465
Google (36,706
Webfont (835
Woff (330