cc.me / Fonts

Fonts.

Search the Google Fonts catalog and download font files. cc.me indexes a local clone of the repository and serves it over a small JSON API with an open CORS policy, so any page can look up families and fetch .ttf files directly.

Family

GET /fonts/<slug> returns one family with the same fields plus its variable-font axes.

GET /fonts/roboto
{
  "slug": "roboto",
  "name": "Roboto",
  "variable": true,
  "files": [ "…" ],
  "axes": [
    { "tag": "wght", "min": 100, "max": 900 }
  ]
}

Download

GET /fonts/<slug>/<filename> returns the font file with the right font/* content type and a long Cache-Control. Use a filename from the family's files list; anything else is a 404.

GET /fonts/roboto/Roboto%5Bwdth,wght%5D.ttf

Load one straight into a page with the CSS Font Loading API or an @font-face:

@font-face {
  font-family: "Roboto";
  src: url("https://cc.me/fonts/roboto/Roboto%5Bwdth,wght%5D.ttf") format("truetype");
}

Errors

404
Unknown family slug, or a filename not listed for that family.