next/font.
Default Setup
The fonts are configured inapp/layout.tsx:
--font-geist and --font-geist-mono are applied to the <html> element and referenced by Tailwind.
Changing Fonts
1. Import your fonts
Replace the imports inapp/layout.tsx. Any Google Font or local font works.
2. Update the class names
In the same file, find where the font variables are applied to the<html> element and replace the old variable references with your new ones:
Keep the CSS variable names (
--font-geist and --font-geist-mono) the same to avoid updating Tailwind config and globals.css. If you prefer different variable names, update the fontFamily section in tailwind.config.ts to match.Using local fonts
For self-hosted fonts, usenext/font/local instead:
app/fonts/. The src path in next/font/local is resolved relative to the file that calls it (typically app/layout.tsx), so ./fonts/MyFont.woff2 maps to app/fonts/MyFont.woff2.