Next.js Discord

Discord Forum

i want to use custom fonts in my project

Unanswered
Entlebucher Mountain Dog posted this in #help-forum
Open in Discord
Avatar
Entlebucher Mountain DogOP
import font in global css
and then i trying to render the font in layout file
Image
Image

8 Replies

Avatar
Entlebucher Mountain DogOP
@SupremeDeity
Avatar
!=tgt
In this case, you don't
you go into tailwind.config.ts
and under extend
you enter
    fontFamily: {
       sans: ["SutonnyMJ"]
    },
tailwind.config.ts
Avatar
SupremeDeity
Combine this with this if you want to use tailwind css. Although for your use case the above link should be enough.
https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#with-tailwind-css