-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Fonts flicker on load and reload #19400
Comments
Having a flash of unstyled text/show of fallback text is pretty normal, but not on subsequent reloads. Please provide access to your code or create a reproduction. Also, try using the Lastly, try our docs: |
Hello @LekoArts, thanks for the reply. I'm a little confused by what you mean by |
@LekoArts I replaced the |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Importing fonts from gatsby-browser.js fonts are still beeing stored in static/fonts/ and imported in css file as usual ` @font-face { @font-face { ` I've checked, this works for both develpment and release |
It was happening on my site too. The issue was that I didn't change the font-family in the autogenerated layout.css instead given font-family to individual components. Setting my desired font in the layout.css fixed the issue for me. |
I have something strange happening in the same way in my page. I put open-sans as the default font but it changes in the first load and in reloading but i dont charge any other different font. |
I'm building out my portfolio site using Gatsby and I'm pretty much finished with it but I'm running into a problem with my fonts producing a sudden flicker on page refresh. Almost as if the site is falling back on fonts then quickly loading the intended font-family. I checked the network tab and the fonts are being loaded with a 304 status code, I'm not sure if that could be attributed to the problem or not. This was happening when I was importing the fonts from Google fonts in a sass file (using the @font-face import) and figured that was the problem. So I instead reached for the typography.js package to load in fonts, I'm requiring the two fonts I'm using in the gatsby-browser config file but it's still happening. Here's a link to my site for reproducing the problem.
The text was updated successfully, but these errors were encountered: