-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add font to fontFamily in global theme #21
Comments
Why doesn't it work in Edit: can confirm that solution doesn't work in the NextJS template. Something is preventing the changes to render in browser. Happy to have this flagged as a 🐛 @rtivital, thanks for trying! |
You did not include font files
|
That looks to have solved it. Is it possible to get this included in the https://mantine.dev/theming/typography/ section of the docs? I'm happy to contribute to the docs for it. Edit: my only gripe with this method is that it ignores Next's font optimisation so it's not an optimal solution more of a work around. Nonetheless, thanks for the quick response! |
An alternative way as opposed to loading font scripts would be to use import { Jura} from 'next/font/google'
const jura = Inter({ subsets: ['latin'] })
export const theme = createTheme({
fontFamily: jura.style.fontFamily
}) |
docs: update README.md
I've been trying to add a specific font
Jura, sans-serif
to the global themetheme.ts
.I followed this guide https://mantine.dev/theming/typography/ and it doesn't work with
Jura, sans-serif
from Google Fonts. It does correctly change the font toVerdana, sans-serif
like in the example.How do I get this to work:
Also, how do I get select components to have different fonts outside of those that are set in
theme.ts
? There doesn't seem to be an example having the<Button />
have one font then the<Input />
adopt a different font again.Only thing I can think of is not having Mantine
theme.ts
manage the fonts and do the NextJS method of font management. Is that possible?The text was updated successfully, but these errors were encountered: