Skip to content

Conversation

itsjavi
Copy link

@itsjavi itsjavi commented Aug 1, 2025

This PR addresses the following UI issues:

  • Fixes flash of unstyled text while fonts are loading by preloading the font stylesheets in all templates
  • By setting the proper as, rel and crossorigin attributes, it prevents the browser warning: The resource https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

@brookslybrand
Copy link
Contributor

Hey @itsjavi, sorry this has taken me so long to get to

I'm not actually able to reproduce any font flickering or the warning you shared. What browser are you using? I created new basic template and tried it in Chrome, Firefox, and Safari and had no issues in any of them

I adapted the links export from what Google Fonts itself encourages:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Geist:[email protected]&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants