Jump to content

Adding custom font

Recommended Posts

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

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted (edited)

Can you share the code that you used? Did you upload the font or import it?

Edited by Ziggy

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted (edited)

@Ziggy

@font-face {
    font-family: 'boston' !important;
    font-style: normal;
    font-weight: normal;
    src: url('https://static1.squarespace.com/static/5e4fbf1bcca9df2618531431/t/65a52f5939dac9706d476efc/1705324378040/BostonRegular.woff') !important;
    }

Edited by maknunhosen
Posted

@maknunhosen Great start! The above code you shared is to activate the font, and then you have to apply it to specific headings or fonts across the site. For example, if you want to apply it to all headings, you would put in after this:

h1, h2, h3, h4 {
font-family: 'boston';
}
Posted

@justin.mabee

Sorry yes it has all the other h1, h2, h3, h4 as well. It is working fine on web and android. Just iOS

The full code is: 

@font-face {
    font-family: 'boston' !important;
    font-style: normal;
    font-weight: normal;
    src: url('https://static1.squarespace.com/static/5e4fbf1bcca9df2618531431/t/65a52f5939dac9706d476efc/1705324378040/BostonRegular.woff') !important;
    }
    
h1, h2, h3, h4, h5{
  font-family:'Boston' !important;
  font-weight: 700 !important;
}

h1{
  font-size: 50px !important;
  line-height: 55px !important;
}

h2{
  font-size: 32px !important;
  line-height: 35.2px !important;
}

h3{
   font-size: 24px !important;
  line-height: 26.4px !important;
}

p{
  font-family:'boston' !important;
  font-weight: 400;
  font-size: 20px !important;
  line-height: 30px;
}

Posted
5 minutes ago, maknunhosen said:

@font-face {
    font-family: 'boston' !important;
    font-style: normal;
    font-weight: normal;
    src: url('https://static1.squarespace.com/static/5e4fbf1bcca9df2618531431/t/65a52f5939dac9706d476efc/1705324378040/BostonRegular.woff') !important;
    }

It looks like you have a disparity between that code and the code you are applying the font with, make sure the font family name is identical, you currently have uppercase and lowercase B

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

You may need to use a .ttf or .otf file. WOFF files don't always work for me.

Additionally, you don't need to put !important on every single line, including the top font-family part. 

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.