Jump to content

Help with custom font

Recommended Posts

On 2/24/2024 at 8:11 AM, tuanphan said:

Have you tried declaring all font format into one code yet? something like this 

image.thumb.png.19a0f05be7b1f651fcbb423eecc9f94f.png

Hi @tuanphan. I tried now to insert the following code, but still not showing correct in Safari. This is my code:
 

/* font new */
@font-face {
  font-family: 'Classico';
  src: url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7096dd06f7d446b85ccba/1708591469756/ClassicoRegular.woff2') format('woff2'),

/* Modern Browsers */
url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d709198ea47f6464ef17b0/1708591385270/ClassicoRegular.woff') format('woff'),

/* Pretty Modern Browsers */
url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7089b6743983e5a4e7519/1708591259927/ClassicoRegular.ttf') format('truetype'), /* Safari, Android, iOS */
       url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65b8ca64a20cfe4c6473e639/1706609252306/Classico.otf') format('opentype');
}

/* Apply the font to heading elements */
h1, h2, h3, h4 {
  font-family: 'Classico';
  letter-spacing: 0em;
  font-weight: 500;
}

Thank you for your help!
Sibylle

Link to comment

Try this font face code to this

@font-face {
    font-family: 'Classico';
    src: url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7096dd06f7d446b85ccba/1708591469756/ClassicoRegular.woff2') format('woff2');
    src:url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d709198ea47f6464ef17b0/1708591385270/ClassicoRegular.woff') format('woff'),/* Pretty Modern Browsers */ url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7089b6743983e5a4e7519/1708591259927/ClassicoRegular.ttf') format('truetype'),/* Safari, Android, iOS */ url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65b8ca64a20cfe4c6473e639/1706609252306/Classico.otf') format('opentype');
}

 

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
3 hours ago, tuanphan said:

Try this font face code to this

@font-face {
    font-family: 'Classico';
    src: url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7096dd06f7d446b85ccba/1708591469756/ClassicoRegular.woff2') format('woff2');
    src:url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d709198ea47f6464ef17b0/1708591385270/ClassicoRegular.woff') format('woff'),/* Pretty Modern Browsers */ url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7089b6743983e5a4e7519/1708591259927/ClassicoRegular.ttf') format('truetype'),/* Safari, Android, iOS */ url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65b8ca64a20cfe4c6473e639/1706609252306/Classico.otf') format('opentype');
}

 

Hi @tuanphan
What is the difference? The codes seem identically to me.
I tried to insert yours but still wrong in Safari 😞

Here is the code that is inserted now:

/* font new */
@font-face {
    font-family: 'Classico';
    src: url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7096dd06f7d446b85ccba/1708591469756/ClassicoRegular.woff2') format('woff2');
    src:url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d709198ea47f6464ef17b0/1708591385270/ClassicoRegular.woff') format('woff'),/* Pretty Modern Browsers */ url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65d7089b6743983e5a4e7519/1708591259927/ClassicoRegular.ttf') format('truetype'),/* Safari, Android, iOS */ url('https://static1.squarespace.com/static/65b8c951444ba3568c38a245/t/65b8ca64a20cfe4c6473e639/1706609252306/Classico.otf') format('opentype');
}


/* Apply the font to heading elements */
h1, h2, h3, h4 {
  font-family: 'Classico';
  letter-spacing: 0em;
  font-weight: 500;
}

 

Thanks
Sibylle

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.