Next.js Discord

Discord Forum

next/font/local

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
When using next/font/local, the generated font-family becomes font-family: '__Boing_ed037b'

const Boing = localFont({
src: '../../public/Boing.woff',
weight: 'normal',
style: 'normal',
display: 'swap',
})

However, I am referencing below in my styled component and it is defined in a separate repo. Is there a way to force nextjs define the font-family to be 'Boing' instead of its auto generated one?

const FontStyle = styled(BaseText)font-family: 'Boing', -apple-system, BlinkMacSystemFont

0 Replies