back

Docs

Self-host any font from the catalog via @font-face, or query the catalog programmatically via the REST API.

Why this

Not the biggest catalog (Google) or the slickest npm packaging (Fontsource) — built on taste. Real @font-face previews, not metadata tables. Per-variant .woff2 served direct from the CDN with an immutable one-year cache, no tracking. A public REST API for the whole catalog. No npm step, no hostname swap, no sterile grid.

Self-hosting a font

Every variant is served as a standalone .woff2 file from our CDN. Copy the @font-face block from any family page, or use the pattern below — static weight on the left, variable range on the right.

@font-face {
  font-family: "Aguafina Script";
  src: url("https://cdn.fasu.dev/fonts/ofl/aguafina-script/aguafina-script-normal-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

Self-hosting with vite-fonts

@pyyupsk/vite-fonts downloads and self-hosts a family at build time on any Vite-based project — Astro has first-class support (shown below). Point source at "pyyupsk" to pull from this catalog.

// astro.config.ts
import { fonts } from "@pyyupsk/vite-fonts/astro";

export default defineConfig({
  integrations: [fonts("Inter:variable", { source: "pyyupsk" })],
});

REST API

Public, no auth, CORS open. Base URL:

https://fonts-api.fasu.dev

GET /api/fonts

List families, optionally filtered.

  • category (string) — e.g. sans-serif, serif, display, handwriting, monospace
  • license (string) — ofl | apache | ufl
  • search (string) — match against family name
{
  "families": [
    {
      "id": "inter",
      "name": "Inter",
      "designer": "Rasmus Andersson",
      "category": "sans-serif",
      "license": "ofl",
      "isNoto": false,
      "dateAdded": "2020-01-24",
      "sourceRepositoryUrl": "https://www.github.com/rsms/inter",
      "wghtMin": 100,
      "wghtMax": 900
    },
    {
      "id": "inter-tight",
      "name": "Inter Tight",
      "designer": "Rasmus Andersson",
      "category": "sans-serif",
      "license": "ofl",
      "isNoto": false,
      "dateAdded": "2022-07-22",
      "sourceRepositoryUrl": "https://github.com/rsms/inter-gf-tight",
      "wghtMin": 100,
      "wghtMax": 900
    }
  ]
}

GET /api/fonts/full

All families with their variants and subsets in one call. Used by this site's build step — heaviest endpoint, prefer caching the result.

{
  "families": [
    {
      "family": {
        "id": "inter",
        "name": "Inter",
        "designer": "Rasmus Andersson",
        "category": "sans-serif",
        "license": "ofl",
        "isNoto": false,
        "dateAdded": "2020-01-24",
        "sourceRepositoryUrl": "https://www.github.com/rsms/inter",
        "wghtMin": 100,
        "wghtMax": 900,
        "licenseUrl": "https://scripts.sil.org/OFL"
      },
      "variants": [
        {
          "id": "inter-400-normal",
          "familyId": "inter",
          "style": "normal",
          "weight": 400,
          "postScriptName": "Inter-Regular",
          "fileUrl": "https://cdn.fasu.dev/fonts/ofl/inter/inter-normal-variable.woff2"
        }
      ],
      "subsets": [
        {
          "id": "cyrillic",
          "name": "cyrillic"
        },
        {
          "id": "cyrillic-ext",
          "name": "cyrillic-ext"
        }
      ]
    }
  ]
}

GET /api/fonts/:family

Single family by id, with variants and subsets. 404 if unknown.

  • family (string (path)) — family id, e.g. inter
{
  "family": {
    "id": "aguafina-script",
    "name": "Aguafina Script",
    "designer": "Sudtipos",
    "category": "handwriting",
    "license": "ofl",
    "isNoto": false,
    "dateAdded": "2011-11-30",
    "sourceRepositoryUrl": "https://github.com/librefonts/aguafinascript",
    "wghtMin": null,
    "wghtMax": null,
    "licenseUrl": "https://scripts.sil.org/OFL"
  },
  "variants": [
    {
      "id": "aguafina-script-400-normal",
      "familyId": "aguafina-script",
      "style": "normal",
      "weight": 400,
      "postScriptName": "AguafinaScript-Regular",
      "fileUrl": "https://cdn.fasu.dev/fonts/ofl/aguafina-script/aguafina-script-normal-400.woff2"
    }
  ],
  "subsets": [
    {
      "id": "latin",
      "name": "latin"
    },
    {
      "id": "latin-ext",
      "name": "latin-ext"
    },
    {
      "id": "menu",
      "name": "menu"
    }
  ]
}