Unable to use custom font from next/font/google
#2743
Answered
by
segunadebayo
allenhartwig
asked this question in
Q&A
-
I am following the custom font guide to utilize a
Any ideas on how to resolve? |
Beta Was this translation helpful? Give feedback.
Answered by
segunadebayo
Jul 20, 2024
Replies: 1 comment 2 replies
-
This sounds like you added the next font directly to the panda config. Ideally, you should:
export const FiraCode = Fira_Code({
weight: ['400', '500', '700'],
display: 'swap',
subsets: ['latin'],
variable: '--font-fira-code'
})
export default defineConfig({
theme: {
extend: {
tokens: {
fonts: {
fira: { value: 'var(--font-fira-code), Menlo, monospace' },
}
}
}
}
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
allenhartwig
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This sounds like you added the next font directly to the panda config.
Ideally, you should:
https://panda-css.com/docs/guides/fonts#update-panda-config