Starlink review
worth it
- tags
The nextjs font package is very cool, and makes it easy to have your fonts served up locally. This works just as well for local fonts that you've downloaded or something pulled straight from the google mother ship.
Lets hop to it.
|
|
app/globals.css
|
|
Here I'ms setting font-headings
to point to var(--font-national-park)
which we will define below.
tailwind.config.ts
|
|
And a sample page:
app/page.tsx
|
|
I'm going to use the National Park Typeface
Download and the put the woff2
files in app/fonts/national-park
And then in app/layout.tsx
|
|
And done. The nationalPark.variable
will handle all the font swapping
magic.
Just as easy, in fact easier!
app/layout.tsx
|
|
And then tailwind.config.ts
|
|
Previously
Next