I am working on a app where the body has a fontFamily set to 'brandon-grotesque'. I am using a theme provider with Material UI and <Typography>
. If a font specified in themeprovider does not exist, or if there is a typo like 'brandon-grotesk' used within components inside the <body>
tag, I want the fontFamily to fallback to 'brandon-grotesque' instead of defaulting to Times New Roman. How can I achieve this?
In addition, regardless of what font is defined in the fontFamily property, it should only default to Times New Roman if none of the imported fonts are available.
<body style={{ fontFamily: 'brandon-grotesque' }}>
<Main />
<NextScript />
</body>
I also considered trying font-family: 'my-font', inherit
, but that is not valid CSS syntax.