Jump to content

Google font upload via custom CSS

Recommended Posts

  • Replies 5
  • Views 1.2k
  • Created
  • Last Reply

Hi Leopold

Thanks for the help! The site is:  http://lckdn20.com/ 

Unfortuantely that code didn't work. I;ve pasted a screenshot below.

image.png.a4410393880ee04ff6c2fd2d2c0f2445.png

Can I just ask, wouldn't there need to be a middle line of code between @import and h1, which would be: @font-face{font-family: 'Roboto', sans-serif;}  ?

I tried that out of curiosity, and that didn't work either, screenshot below.

image.png.a27abcd7dfd95c903183b7fd3a41a051.png

 

Thanks
Dave

 

 

 

Link to comment

You can add to Home > Settings > Advanced > Code Injection > Header

<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">

then add to Home > Design > Custom CSS

h1 {
	font-family: 'Roboto', sans-serif;
}

 

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
On 8/27/2020 at 5:14 PM, londonumlungu said:

Can anyone pls tell me what is wrong with this code when trying to upload a Google font via custom CSS.

I'm not clear why you are trying to add the Roboto font with code. Many Google Fonts are built into Squarespace and can be used without requiring code:

roboto-font.thumb.png.4231c456f22e053864d568634504afd5.png

 

 If this helps you, please click "Like" below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.