N
Nuxt2y ago
abd

How to add custom fonts project wide

Can anyone share a nuxt3 sample on adding fonts project wide? Examples I have looked for online dont work
3 Replies
taunoha
taunoha2y ago
Hi! What do you mean by adding fonts project wide? Or you just look a way to add custom links to the head? https://nuxt.com/docs/api/configuration/nuxt-config#head
Nuxt
Nuxt Configuration Reference · Nuxt
Discover all the options you can use in your nuxt.config.ts file.
abd
abdOP2y ago
@taunoha I would like to be able to add a custom font that I can then use in any component template
taunoha
taunoha2y ago
If you are not using any CDN (for example, google fonts), you could write your own CSS file and define your font-face there https://nuxt.com/docs/api/configuration/nuxt-config#css Your local custom font file or files should be in the "public" folder.
Nuxt
Nuxt Configuration Reference · Nuxt
Discover all the options you can use in your nuxt.config.ts file.
Want results from more Discord servers?
Add your server