Custom font not showing on IOS Devices

Custom font not showing on IOS Devices

ShanerT
Tourist
9 0 2

Hey there,

My custom fonts don't show up on IOS devices or Safari. I've been trying every single method on the Shopify Forum, but to no avail, none of them worked. This is the website: comfyskin.nl

 

This is the code I have applied to the assets/base.css folder:

@font-face {
font-family: 'Gilroy-SemiBold';
font-style: normal;
font-display: swap;
src: url('https://cdn.shopify.com/s/files/1/0882/4412/6029/files/Gilroy-SemiBold.woff2') format('woff2'),
url('https://cdn.shopify.com/s/files/1/0882/4412/6029/files/Gilroy-SemiBold.woff') format('woff'),
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: antialiased;
}

@font-face {
font-family: 'Gilroy-Regular';
font-style: normal;
font-display: swap;
src: url('https://cdn.shopify.com/s/files/1/0882/4412/6029/files/Gilroy-Regular.woff2') format('woff2'),
url('https://cdn.shopify.com/s/files/1/0882/4412/6029/files/Gilroy-Regular.woff') format('woff'),
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: antialiased;
}


body, p, a {
font-family: 'Gilroy-Regular', sans-serif!important;
}

h1, h2, h3, h4, h5, h6 {
font-family: 'Gilroy-SemiBold', sans-serif!important;
}


 

Reply 1 (1)

EcomGraduates
Shopify Partner
826 70 120

Your font isn't showing up on iOS or Safari because Safari has stricter font loading rules. m

ake sure your font files are actually accessible. Open the URLs you’re using for the font files in a browser to confirm they load properly. If they don’t, try re-uploading them in Shopify’s "Files" section and updating the links.

 

make sure you add the format("woff2") first and then the format("woff")

 

@font-face {
  font-family: 'Gilroy-SemiBold';
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.shopify.com/s/files/1/0882/4412/6029/files/Gilroy-SemiBold.woff2') format('woff2'),
       url('https://cdn.shopify.com/s/files/1/0882/4412/6029/files/Gilroy-SemiBold.woff') format('woff');
}

 


 If this fixed your issue, likes and accepting as a solution are highly appreciated
|  Build an online presence with our custom-built Shopify Theme: EcomifyTheme
|  Check out our reviews: Trustpilot Reviews
|  We are Shopify Partners: EcomGraduates Shopify Partner