i want to use custom fonts in my project
Unanswered
Entlebucher Mountain Dog posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Entlebucher Mountain DogOP
import font in global css
and then i trying to render the font in layout file
and then i trying to render the font in layout file
![Image](https://cdn.discordapp.com/attachments/1205042408275058699/1205042408610463774/Screenshot_from_2024-02-08_12-05-30.png?ex=65d6ee32&is=65c47932&hm=abebeb68457f4f55aea7591bb6583903413952efbc2173dd17d4bd8656f404d4&)
![Image](https://cdn.discordapp.com/attachments/1205042408275058699/1205042408811798578/Screenshot_from_2024-02-08_12-04-19.png?ex=65d6ee32&is=65c47932&hm=1794f132a4fe5fd6df26f4e6ef76912b1c000e5d80a32d9179b39b7ea900b71a&)
8 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Entlebucher Mountain DogOP
@Clown
![Avatar](https://cdn.discordapp.com/avatars/1053443057451794585/e11a0f3625ffde367560e0dd06797c0d.webp?size=256)
!=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](https://cdn.discordapp.com/avatars/678259999201427466/a_54265510de155a7d7909e4d21d587a76.gif?size=256)
Clown
For Local Fonts(custom):
https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#local-fonts
https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#local-fonts
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
https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#with-tailwind-css