Jump to content

Code for Custom Font only loads in chrome and not safari or on an iphone!

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hello,

I'm currently working on a new website and I have some issues with one of my custom fonts I added in the css code for the H3 title.
I'm working on Google Chrome and everything works perfectly but when I checked the website on Safari and on mobile (iPhone) the custom font doesn't appear. On Samsung everything is fine. I added the mention "!important" in the code to make sure it works but it doesn't. There's only one sentence where it's the right font on Safari (picture 1 attached)

Could you help me please ?

Here is the link to the website : https://perch-springtail-26rt.squarespace.com
Password: Ponnaz_1904

You can find some screenshots attached.

Thank you for your help!

Picture_1_font_OK_safari.png

Picture_2_font_OK_google.png

Picture_3_font_wrong_safari.png

Picture_4_font_wrong_safari.png

Picture_5_font_OK_google.png

  • Replies 13
  • Views 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Your font face code is incorrect, you need to declare exact font file url in font-face code

for example first font

@font-face {
    font-family: "proxima-nova",sans-serif;
    font-weight: 600;
    font-style: normal
}

it should be

@font-face {
    font-family: "proxima-nova";
    src: url(enter proxima nova font file url here);
}

 

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

Hello,

Thank you for your answer.

Unfortunately it's still not working for the Garamond premier pro font. 

I added the code you sent but it's still not working on Safari... 

@font-face {
font-family: "garamond-premier-pro", serif;
font-weight: 400;
font-style: italic;
}
@font-face {
    font-family: "garamond-premier-pro";
    src: url(https://static1.squarespace.com/static/620bd3ee5f90c228fd0ee4cb/t/646dc184790223001e705677/1684914566730/Garamond+Premier+Pro+Light+Italic+Display.otf);
}

Could there be another issue ?

 

Capture d’écran 2023-05-24 à 09.53.24.png

Posted

I am trying to make BrownMedium load for the titles and BrownRegular load for paragraphs... Works fine on Chrome and not on Safari or an iPhone. SIGH. Thank you in advance for any help you can provide 🙂 

Website is http://www.radishstudio.com
pw is nmz18t

@font-face {
    font-family: BrownLL-Regular;
    src: url(https://static1.squarespace.com/static/62d5e943b0405400f7532c29/t/6431b08cf240232a6d67f260/1680978060337/BrownLL-Regular.otf);
}
p, h1, h2, h3, button, a.btn.btn--border.theme-btn--primary-inverse, .header-nav *,nav.header-menu-nav-list *, h1.ProductItem-details-title {
    font-family: BrownLL-Regular;
}

.products.collection-content-wrapper .list-grid *, .product-block *, .collection-type-products .grid-title {
    font-family: BrownLL-Regular !important;
}

 

  • Solution
Posted (edited)

Change your current code in CSS box to this code

@font-face {
    font-family: 'BrownLL-Medium';
    src: url(https://static1.squarespace.com/static/62d5e943b0405400f7532c29/t/6432d2f78d5c8373663a6523/1681052407189/BrownLL-Medium.otf);
}
@font-face {
    font-family: 'BrownLL-Regular';
    src: url(https://static1.squarespace.com/static/62d5e943b0405400f7532c29/t/6431b08cf240232a6d67f260/1680978060337/BrownLL-Regular.otf);
}
h1, h2, h3, h4, p, .list-section-title p, section.grid-meta-wrapper *, h1.ProductItem-details-title {
    font-family: 'BrownLL-Regular';
}
.blog-item-title h1, .blog-basic-grid h1 {
    font-family: 'BrownLL-Medium' !important;
}
.sqs-block-summary-v2 .summary-title,.sqs-block-summary-v2 .summary-heading {
    font-family: BrownLL-Regular;
    font-weight: 600;
    font-size: 24px !important;
}

 

Edited by tuanphan
missing a class name

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

  • 1 month later...
Posted

Hi,

I'm using a specific font for the front page but it's not showing up correctly in safari (it shows in google). 

Do you know if there's any way to fix this?

//first pg welcome to font change//
#block-yui_3_17_2_1_1674683519955_9936
{   h2 {
font-family: "winsome", sans-serif !important;
font-weight: 600;
font-style: normal;
  font-size: 73px}}

@media only screen and (max-width: 640px) {
#block-yui_3_17_2_1_1674683519955_9936
{   h2 {
font-family: "winsome", sans-serif !important;
font-weight: 600;
font-style: normal;
  font-size: 45px}}
}
@media only screen and (max-width: 640px) {#block-yui_3_17_2_1_1674704548230_62972{
   h1 {font-size:3.0rem !important} 
  }}
//end//

Screenshot 2023-07-24 at 10.25.40 AM.png

Screenshot 2023-07-24 at 10.25.34 AM.png

  • 2 weeks later...

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.