Jump to content

Syntax error when uploading fonts.

Recommended Posts

Posted

Site URL: http://krandalldesign.com/

Hello! I keep getting a syntax error  on line 1 when uploading fonts (see attached screenshot).

I have been searching for over an hour and cannot sort out what I am doing wrong, I've never coded a website before so I am not 100% sure what to look for.

Anyone able to help?

Thanks!

Screenshot 2020-02-07 at 10.44.55.png

  • Replies 8
  • Views 2.7k
  • Created
  • Last Reply
Posted

Hi! Thank you for the response, When I followed your directions it removed the "syntax error" but the font does not show up as an option in the drop-down font list. Do you know why this might be?

Posted
1 hour ago, skrandall said:

Hi! Thank you for the response, When I followed your directions it removed the "syntax error" but the font does not show up as an option in the drop-down font list. Do you know why this might be?

No. Custom font won't appear there. You need to use CSS to set font

eg

@font-face {
	font-family: 'Gotham Book';
	src: url(paste font url you uploaded here);
}
h1, h2, h3, h4 {
	font-family: 'Gotham Book';
}

 

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!)

  • 8 months later...
Posted

@rebmcgirr

Generally there are three things you need to do.

First upload the font to Squarespace. Please see Using the CSS Editor > Upload files (optional). Technically you don't need to upload to SS if you have some other place to host the font file. It just needs to be available on the internet somewhere.

Second you then need to define a font-face rule-set for CSS. That is usually done in Design > Custom CSS.

Third you need to apply the font family to the desired elements.

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Posted
11 hours ago, rebmcgirr said:

Hello, if i have a font file and not a URL, what is the code i need to use?  thank you!

Upload to your site & you will have url.

Design > Custom CSS> Click Manage Custom Files > Upload font > Click font you just uploaded > The SS will paste url in Custom CSS box > Cut url & paste in font face code

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!)

Posted

thank you!!! another (i'm sure obvious) question - can you share the code needed to add it to the paragragh (1, 2, 3, 4...)?  What about the header/footer fonts?

 

THANK YOU!! so helpful!

Posted
1 hour ago, rebmcgirr said:

can you share the code needed to add it to the paragragh (1, 2, 3, 4...)?

There is a general example in @tuanphan's post from the 2/10.

For more specific information please post the URL to your site.

If your site is not public please set up a site-wide password, if you've not already done so. Post the password here.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.