Adding a font to astro
very simple
- tags
- fonts
- astro
- tailwind
- fontsource
Contents
- Go to fontsource.org and find your font.
- Install, e.g.
npm install @fontsource-variable/noto-serif
In your BaseLayout.tsx (or similiar)
| |
- In
tailwind.config.mjsset your font.
| |
- Use
font-serifwhere appropriate.
References
Previously
Next