it is very sad that theme ui have no support to use local or custom fonts. #1967
-
I have try to add custom font to my next js project but I am disappointed by seeing that there have no way to add custom font in theme-ui. I have read the documentation but I didn't find any solution. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @MohammadSahabuddin This is because a lot goes into loading, preloading, caching, preventing FOUT... What you are looking for is probably something like this Web Font Loader
|
Beta Was this translation helpful? Give feedback.
Hi @MohammadSahabuddin
Font loading is not something that is usually handled by libraries like this one. How you load a font is gonna be specific to the type of font (hosted, local) and your environment (Next, Nuxt, CRA, Gatsby, ...).
This is because a lot goes into loading, preloading, caching, preventing FOUT...
This thread might be useful to you Preload custom font with Next.js
What you are looking for is probably something like this Web Font Loader