Overview
The Sunflower Capital website uses two custom font families to create a distinctive typographic hierarchy:- Arya - Used for headings and display text
- Bitter - Used for body text and readable content
/public/fonts directory and configured via CSS @font-face declarations.
Font Loading
Font faces are defined insrc/app/globals.css using the @layer base directive:
globals.css
Using
@layer base ensures font declarations are included in Tailwind’s base layer, loaded before components and utilities.Font Directory Structure
Tailwind Configuration
The fonts are registered intailwind.config.ts for use with utility classes:
tailwind.config.ts
system-ui as a fallback in case the custom font fails to load.
Usage
Arya Font (Headings)
Usefont-arya for headings and display text:
Bitter Font (Body Text)
Usefont-bitter for body text and readable content:
Font Weights
Arya
| Weight | Class | Value |
|---|---|---|
| Regular | font-normal | 400 |
| Bold | font-bold | 700 |
Bitter (Variable Font)
Bitter uses a variable font file, which supports a range of weights:What is a Variable Font?
What is a Variable Font?
Variable fonts contain multiple font weights in a single file, allowing you to use any weight value between the minimum and maximum supported range. This reduces the number of font files needed and provides more typographic flexibility.The Bitter variable font likely supports weights from 100-900, though the specific range depends on the font file.
Performance Considerations
Font Loading Strategy
Troubleshooting
Fonts not loading
Fonts not loading
- Verify font files exist in
/public/fonts/ - Check browser console for 404 errors
- Ensure paths in
@font-faceare correct (relative to/public) - Clear browser cache and hard reload
Italic not working with Bitter
Italic not working with Bitter
Use the
font-bitter-italic class instead of font-bitter italic:Font weights not working
Font weights not working
For Arya, only weights 400 and 700 are loaded. Use
font-normal or font-bold.For Bitter, the variable font should support all weights. If not working:- Verify the font file is a true variable font
- Check browser compatibility with variable fonts
Adding New Fonts
To add a new custom font:Related Documentation
Tailwind Configuration
Font sizes, colors, and theme customization
Animations
CSS animations and interactive effects