how to use a custom local font for the entire application
i have a local font that have 5 types (thing, light, regular, bold. dark)
each one is on a different woff2 file, i want to make my app to use the regular font always and also be able to use any other variation if i wanted to
can someone tell me how i can do that?
4 Replies
There are so many resources online that cover this. An example being: https://medium.com/@sawacrow/different-font-weight-files-in-a-single-font-family-6c432a1e8e5a
Perhaps try the Nuxt Fonts module. https://fonts.nuxt.com/get-started/configuration
Then you can just point to the woff2 files right in your Nuxt config - something like this:
Or maybe even just use the local provider and point it to the fonts in your
/public
directory. Sounds like it will pick it up automatically: https://fonts.nuxt.com/get-started/providers#localNuxt Fonts
Providers - Nuxt Fonts
Font providers are designed to be pluggable and extensible, so no matter your setup you should be able to use an existing provider or write your own.
Thanks 🙏