Jump to content

Custom font doesn't work on mobile

Recommended Posts

Site URL: http://www.definepilates.co.nz

Hey team - total novice here!!

Can anyone help me to understand why our custom font doesn't work on mobile - but it does on desktop? 

Our website is definepilates.co.nz 

Our code for the font is  below ( I think!). 

Thanks loads

Vicky 

@font-face {
font-family: 'commuterssans';
src: url('FontURLhttps://static1.squarespace.com/static/620849d5fcf266763285fceb/t/621e669c21e49a69ca53177b/1646159516508/commuterssans-semibolditalic.otf');}

p1{font-family: 'commuterssans';}
p2{font-family: 'commuterssans';}
p3{font-family: 'commuterssans';}
p4{font-family: 'commuterssans';}


@font-face {
font-family: 'Branch';
src: url('FontURLhttps://static1.squarespace.com/static/620849d5fcf266763285fceb/t/621e66b57f53f92a8feb36ad/1646159542315/Branch.ttf');}
h1 {font-family: 'Branch';}
h2 {font-family: 'Branch';}
h3 {font-family: 'Branch';}
h4 {font-family: 'Branch';}

//Sans Serif Headings
h3 {
  font-family: 'ss-pro', sans-serif !important;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2em;
}
h4 {
  font-family: 'ss-pro', sans-serif !important;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.8em;

  strong {
    font-weight: 900;
    //color: red;
  }
}

//paragraph 1
.sqsrte-large {
}

//paragraph 2
p {
}

//paragraph 3
.sqsrte-small {
}

//invert logo colour
body:not(.homepage) .header-title-logo {
    filter: invert(0.7);
}
body#collection-621e70c508ae120ad1b15cd8 .header-title-logo {
    filter: invert(0);  
}

//thinner nesletter form
.sqs-block-newsletter .newsletter-form-field-element {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
button.newsletter-form-button.sqs-system-button {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

Link to comment
  • Replies 1
  • Views 108
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

7 hours ago, vickyshepherd said:

Site URL: http://www.definepilates.co.nz

Hey team - total novice here!!

Can anyone help me to understand why our custom font doesn't work on mobile - but it does on desktop? 

Our website is definepilates.co.nz 

Our code for the font is  below ( I think!). 

Thanks loads

Vicky 

@font-face {
font-family: 'commuterssans';
src: url('FontURLhttps://static1.squarespace.com/static/620849d5fcf266763285fceb/t/621e669c21e49a69ca53177b/1646159516508/commuterssans-semibolditalic.otf');}

p1{font-family: 'commuterssans';}
p2{font-family: 'commuterssans';}
p3{font-family: 'commuterssans';}
p4{font-family: 'commuterssans';}


@font-face {
font-family: 'Branch';
src: url('FontURLhttps://static1.squarespace.com/static/620849d5fcf266763285fceb/t/621e66b57f53f92a8feb36ad/1646159542315/Branch.ttf');}
h1 {font-family: 'Branch';}
h2 {font-family: 'Branch';}
h3 {font-family: 'Branch';}
h4 {font-family: 'Branch';}

//Sans Serif Headings
h3 {
  font-family: 'ss-pro', sans-serif !important;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2em;
}
h4 {
  font-family: 'ss-pro', sans-serif !important;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.8em;

  strong {
    font-weight: 900;
    //color: red;
  }
}

//paragraph 1
.sqsrte-large {
}

//paragraph 2
p {
}

//paragraph 3
.sqsrte-small {
}

//invert logo colour
body:not(.homepage) .header-title-logo {
    filter: invert(0.7);
}
body#collection-621e70c508ae120ad1b15cd8 .header-title-logo {
    filter: invert(0);  
}

//thinner nesletter form
.sqs-block-newsletter .newsletter-form-field-element {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
button.newsletter-form-button.sqs-system-button {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

Hi, the fonts are showing up fine on my end (picture below), but your custom font css code has an error. You forgot to remove 'FONTURL' in the code which may be causing the issue. Here's the re-formatted code:

@font-face {
  font-family: 'commuterssans';
  src: url('https://static1.squarespace.com/static/620849d5fcf266763285fceb/t/621e669c21e49a69ca53177b/1646159516508/commuterssans-semibolditalic.otf') format('truetype');
}

@font-face {
  font-family: 'Branch';
  src: url('https://static1.squarespace.com/static/620849d5fcf266763285fceb/t/621e66b57f53f92a8feb36ad/1646159542315/Branch.ttf') format('truetype');
}

And just a tip! Commuters Sans is available in Squarespace via the Site Styles. You may remove the code for it and activate it on the website which actually improves site speed. Let me know how it goes 🙂

1101084806_ScreenShot2022-03-25at15_53_52PM.thumb.png.6426114dbf284199c1797ff61f43581f.png

Edited by Jia

Please give this a 👍 if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

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.