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.mjs
set your font.
|
|
- Use
font-serif
where appropriate.
References
Previously
Next