Jump to content

Custom font not working in Safari and on mobile

Go to solution Solved by tuanphan,

Recommended Posts

URL: https://muenchensued.squarespace.com/
Password: Schwalbe

Hi there, I'm using a custom Google font (Rowdies) on my website, and it's working fine in Chrome but not in Safari and on mobile - the font that shows is a completely different one from the ones set in the site styles as well, which is strange. Is there a way of either making the font work everywhere or at least establishing that if the custom font can't be loaded it reverts back to what's defined in the site styles?

This is the code I'm using

@import url('https://fonts.googleapis.com/css?family=Rowdies:wght@300&display=swap');
h1{font-family: 'Rowdies', cursive;}
h2{font-family: 'Rowdies', cursive;}
h3{font-family: 'Rowdies', cursive;}
h4{font-family: 'Rowdies', cursive;}

Thanks so much!

Link to comment
  • Replies 2
  • Views 352
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Add this to Settings > Advanced > Code Injection > Header

<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=Rowdies:wght@300&display=swap" rel="stylesheet">
  h1, h2, h3, h4 {
  font-family: 'Rowdies', cursive !important;


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.