We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Adding custom font to the theme (wharehouse theme) design

Adding custom font to the theme (wharehouse theme) design

lesriches
Excursionist
30 0 10

Hi Community,

 

I am absolutely new to this and trying to figure out how to add my fonts. My fonts Cinzel which are not on google. I understand I need to Add a file under the Assets before I am able to add code or move. However, I am unable to find the right css file. Can someone please direct me how I can secure those files in the right format which can be uploaded in the Assets as a new Asset.
i have added follwing code in the theam.css file but it was not showing in the theme.

 

@font-face {

font-family: 'CinzelMedium';

src: url('CinzelMedium.woff') format('woff');

font-style: normal;
}
h1,h2,h3,h4,h5,h6,body,p,a{ font-family: "CinzelMedium"!important; }

 

Much appreciated!

 

lesriches_0-1721736480394.png

 

Reply 1 (1)

osamafarooqi71
Shopify Partner
262 22 45

Hi @lesriches , when you upload fonts in theme assets folder they get corrupted. Instead upload the font file to Shopify Dashboard > Content > Files and then copy the link and use that link in @font-face property.

 

@font-face {

font-family: 'CinzelMedium';

src: url('YOU_FONT_URL');

font-style: normal;
}

 

Note: Replace 'YOU_FONT_URL' with the actual link.

 

Regards, 

Osama Farooqi

Shopify Theme Developer | Contact me | Hire expert
- Was my reply helpful? Click Like 🙂 to let me know | Buy Me Coffee
- Was your question answered? Mark this as Accepted Solution