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
Montserrat Google Font is not displayed correctly on Firefox and Windows <=10 #36986
Comments
Maybe the <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap" rel="stylesheet"> Also check |
@lu-zen, thank you for answering. I've just tried the proposed solution but unfortunately, it didn't work. |
same with me "next": "12.1.6" the only way to load it in production by add @import in global css but i am not sure this will optimize the preload font? |
@conioX The reason why it is working when using CSS @import is that the font optimization feature is not used in that case. I couldn't find the style part for fonts in my HTML when I inspected the page. That confirms that optimization didn't work. In other words, we could achieve the same by disabling the feature in the next.config.js: |
Same error, here. |
Edit: Disregard this. The issue was due to an outdated version of Freetype. |
Google version of font is outdated, use newer version of font from https://fontsource.org/ |
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101
Binaries:
Node: 16.14.2
npm: 8.5.0
Yarn: 1.22.18
pnpm: N/A
Relevant packages:
next: 12.1.7-canary.6
react: 18.1.0
react-dom: 18.1.0
What browser are you using?
Firefox 99.0
Describe the Bug
When I run the Next web application using the Firefox browser on Windows 10 or less while using the Monseratt Google font, the text is not displayed correctly.
Text is visible, but very light:
This happens only while the Font Optimization feature is enabled. If I disable the future, everything works correctly.
Note: I've tested this using the Lambda test tool since I have the MacBook, but I can confirm that this happens on Windows.
Expected Behavior
The text should be displayed correctly on Firefox when running on Windows 10, the same as it is displayed on Windows 11 or on other browsers:
To Reproduce
npm install
,npm run build
npm start
http://localhost:3000
Or (if you don't want to clone the repo):
npx create-next-app@latest
,pages/_document.js
:styles/globals.css
:npm run build
npm start
http://localhost:3000
The text was updated successfully, but these errors were encountered: