I cannot get some fonts to show as they should be shown once importing them into my React app.
I am using Next.js and Chakra UI.
Theme folder:
import { extendTheme } from "@chakra-ui/react";
import '@fontsource/notable';
import '@fontsource/inter';
export const theme = extendTheme({
fonts: {
heading: `'Notable, sans-serif'`,
body: `'Inter, sans-serif'`,
},
App:
<Heading fontSize={'10rem'}>Heading</Heading>
Screenshot of how it should look:
Screenshot of how it looks for me:
Am I missing something really simple or does this font just not work?
Could you provide the code for your root App and your component?
Have you done this step, from: https://chakra-ui.com/community/recipes/using-fonts?
npm install @fontsource/notable @fontsource/inter
import '@fontsource/notable/400.css' <---- this one
import '@fontsource/inter/700.css' <---- this one
import {
ChakraProvider,
Heading,
} from '@chakra-ui/react'
import theme from './theme'
const App = () => (
<ChakraProvider theme={theme}>
...
<Heading>The spectacle before us was indeed sublime.</Heading>
</ChakraProvider>
)