NextJS Font
Unanswered
Tramp ant posted this in #help-forum
Tramp antOP
Hi, I imported some fonts and they do not appear on my website when I post it only locally
7 Replies
Tramp antOP
export const ProcrastingPixel = localFont({
src: './fonts/ProcrastinatingPixie.ttf',
variable: '--my-font'
})Tramp antOP
When I use the variable in my scss file it doesn't appear
I can only use it directly className={ProcrastingPixel.className}
Tramp antOP
Any idea?
I guess you are mixing the Next js Font import and scss
Both work differently, I had tried with variable in tailwind similar to what you are doing, but I ended up importing that in the global css file
See if you can find anything else helpful!
Both work differently, I had tried with variable in tailwind similar to what you are doing, but I ended up importing that in the global css file
See if you can find anything else helpful!
Tramp antOP
Some reason nextJS doesn't support sass font imports as the file location changes when NextJS loads
So I thought this was the way