Jump to content

Custom font Syntax Error on line 2

Recommended Posts

Site URL: https://www.southcoastpolishedconcrete.com.au/

Hi 

I'm consistently getting a Syntax Error on line 2. I've redone this code several times. Same error.

Any ideas?

Thanks

 

@font-face {
  font-family: 'Handel Gothic Regular';
    src: url('https://static1.squarespace.com/static/62f8539daaeed83dbf327248/t/62fb44c2a851d622757d6a70/1660634306138/Handel+Gothic+Regular.ttf');
}

h1 {
font-family: 'Handel Gothic Regular';

h2 {
font-family: 'Handel Gothic Regular';
}

h3 {
font-family: 'Handel Gothic Regular';
}

h4 {
font-family: 'Handel Gothic Regular';
}

 

Link to comment
  • Replies 4
  • Views 699
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

6 hours ago, KHDigital said:

I managed to get rid of syntax error but still can't get font to show... have tried multiple versions of the font. 

Still syntax error here. You should check it again

You can post all code here. We can check easier

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
  • 1 year later...

I'm getting the same sytax error on line 2. 

This is the code 

 

@font-face {
font-family: ‘Favorit-regular’;
   src: url(‘https://static1.squarespace.com/static/65d1754e7d3e4c35639d2e85/t/65dab3053b8dd007fc1c505e/1708831494401/ABCFavorit-Regular.ttf’);
}

// Headings

// Heading 1
h1 {
   font-family: 'Favorit-regular';
}

// Heading 2
h2 {
   font-family: 'Favorit-regular';
}

// Heading 3
h3 {
   font-family: 'Favorit-regular';
}

// Heading 4
h4 {
   font-family: 'Favorit-regular';
}

// Paragraphs

// Paragraph 1
.sqsrte-large {
   font-family: 'Favorit-regular';
}

// Paragraph 2
p {
   font-family: 'Favorit-regular';
}

// Paragraph 3
.sqsrte-small {
   font-family: 'Favorit-regular';
}

 

Link to comment

You used the wrong quote signs on the second line.

You can check linting sites for Less or CSS like https://www.lesstester.com/

@font-face {
   font-family : "Favorit-regular";
   src: url("https://static1.squarespace.com/static/65d1754e7d3e4c35639d2e85/t/65dab3053b8dd007fc1c505e/1708831494401/ABCFavorit-Regular.ttf");
}

// Headings

// Heading 1
h1 {
   font-family: 'Favorit-regular';
}

// Heading 2
h2 {
   font-family: 'Favorit-regular';
}

// Heading 3
h3 {
   font-family: 'Favorit-regular';
}

// Heading 4
h4 {
   font-family: 'Favorit-regular';
}

// Paragraphs

// Paragraph 1
.sqsrte-large {
   font-family: 'Favorit-regular';
}

// Paragraph 2
p {
   font-family: 'Favorit-regular';
}

// Paragraph 3
.sqsrte-small {
   font-family: 'Favorit-regular';
}

 

Screenshot 2024-03-10 at 04.50.40.png

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.