Typography
Self-hosted font system. ~2,060 open-source font families served from your site's own domain. Change fonts with an AI prompt.
Pagesmith ships a self-hosted font system. Every site loads its fonts from the Pagesmith infrastructure instead of Google Fonts or any other third party. The library covers every Google Font plus a collection of open-source GitHub-hosted fonts.
Specifications
- Families available: ~2,060 open-source font families.
- Curated defaults: 30 families that the AI picks from first (listed below).
- Default font: Inter, preloaded on every new site.
- File format:
.woff2, Latin subset, normal (non-italic) style. - URL pattern:
/_pagesmith/fonts/<family>-<weight>.woff2. - Serving origin: your site’s own domain (same-origin, not a CDN subdomain).
- Cache policy:
Cache-Control: public, immutable, max-age=31536000on every font file. Served from Cloudflare’s edge and shared across all Pagesmith sites. - Manifest:
/_pagesmith/fonts/manifest.jsonlists every available family and its weights. - External font loading: none. No requests are made to
fonts.googleapis.com,fonts.gstatic.com, or similar.
Changing fonts with AI
Describe the change in the chat. Examples:
Make the body text Manrope.
Use Playfair Display for headings and keep Inter for body.
I want a monospace look — try JetBrains Mono throughout.
Change the font to something elegant like a fashion magazine.
The AI picks a font from the registry and updates three files in sync:
src/styles/fonts.css— the@font-facedeclaration pointing at the new font file.src/styles/global.css— the--font-sansCSS variable that Tailwind’sfont-sansutility reads from.src/layouts/BaseLayout.astro— the<link rel="preload">tag so the primary font weight preloads with the page.
When you ask for a font outside the curated 30, the AI checks the full registry of ~2,060 families to verify the exact slug and available weights before writing the change. Commercial fonts (Proxima Nova, Gotham, Futura, etc.) are not in the registry; when asked for one, the AI suggests the closest open-source alternative.
Curated font list
These 30 families are the AI’s default pool.
Modern sans-serif
Inter (default), Manrope, DM Sans, Poppins, Plus Jakarta Sans, Space Grotesk, Outfit, Sora, Work Sans
Classic sans-serif
Montserrat, Open Sans, Lato, Roboto, Nunito
Body serif
Lora, Merriweather, Crimson Pro, Source Serif 4
Display serif
Playfair Display, DM Serif Display, Fraunces, Cormorant, Libre Baskerville
Display / Handwritten
Bebas Neue, Archivo Black, Caveat, Dancing Script
Monospace
JetBrains Mono, Fira Code, IBM Plex Mono
Font file URLs
All fonts live under the reserved /_pagesmith/ prefix on every Pagesmith site:
/_pagesmith/fonts/<family>-<weight>.woff2
Examples:
/_pagesmith/fonts/inter-400.woff2/_pagesmith/fonts/playfair-display-700.woff2/_pagesmith/fonts/geist-500.woff2
The manifest file enumerates every family and its weights:
/_pagesmith/fonts/manifest.json
The /_pagesmith/ namespace
The entire /_pagesmith/* path is reserved for Pagesmith platform resources. No user-created page or route on your site will ever collide with it. The convention matches /_next/ in Next.js or /_astro/ in Astro — underscore-prefixed paths are for framework and platform internals.
Caching and delivery
- Font files are served with an immutable 1-year cache header. Browsers re-fetch them only on cache eviction.
- Files are shared across all Pagesmith sites at Cloudflare’s edge. If a visitor’s browser has loaded
inter-400.woff2from any Pagesmith site, every other Pagesmith site they visit reuses the cached copy. BaseLayout.astroincludes one<link rel="preload">for the primary font weight, so it begins downloading during HTML parse rather than after CSS is parsed.
Third-party requests
A Pagesmith site makes no font-related requests to third-party domains. Specifically:
- No
fonts.googleapis.comCSS fetch. - No
fonts.gstatic.comfont file fetch. - No Adobe Fonts (
use.typekit.net) or Bunny Fonts fetch.
Because fonts are served from your site’s own domain, visitor IP addresses are not transmitted to any external font provider.