Google Fonts
The easiest way to add fonts:Implementation
Using in Tailwind
Popular Font Combinations
Modern & Clean
Professional
Creative
Tech/Startup
Local Fonts
For fonts not on Google Fonts:Add Font Files
Place inpublic/fonts/:
Configure
Font Weights
Common weight names:| Weight | Name |
|---|---|
| 100 | Thin |
| 200 | Extra Light |
| 300 | Light |
| 400 | Regular |
| 500 | Medium |
| 600 | Semi Bold |
| 700 | Bold |
| 800 | Extra Bold |
| 900 | Black |
Loading Specific Weights
Only load what you need for better performance:Font Performance
Optimization Tips
- Load only needed weights - Don’t load all weights
- Limit font families - 2-3 max
- Use font-display: swap - Shows fallback while loading
- Subset fonts - Only latin if that’s all you need
Next.js Font Optimization
Next.js automatically:- Self-hosts fonts (no external requests)
- Preloads fonts
- Eliminates layout shift
- Optimizes loading
Typography Scale
Consistent Sizing
Use Tailwind’s typography scale:| Class | Size |
|---|---|
text-xs | 12px |
text-sm | 14px |
text-base | 16px |
text-lg | 18px |
text-xl | 20px |
text-2xl | 24px |
text-3xl | 30px |
text-4xl | 36px |
text-5xl | 48px |
Custom Scale
Line Height & Spacing
Line Height
Letter Spacing
Common Font Tasks
Change All Fonts
Consistent Typography
Brand Font
Font Fallbacks
Always specify fallbacks:Variable Fonts
Modern fonts with adjustable properties:- Smaller file size
- All weights in one file
- Smooth weight transitions
Troubleshooting
Font not loading
Font not loading
- Check font name spelling
- Verify weight exists for that font
- Check browser console for errors
- Ensure font is properly configured in layout
Flash of unstyled text
Flash of unstyled text
- Next.js font optimization should handle this
- Check font-display is set to ‘swap’
- Ensure fonts are loading with Next.js font system
Font looks different than expected
Font looks different than expected
- Verify you loaded the correct weight
- Check CSS isn’t overriding font settings
- Ensure variable is applied to html/body
Styling Best Practices
More design tips

