Add custom fonts
A guide to add custom fonts to your store
In the theme-building process, sometimes you want to use your own font style instead of the options provided by Zest. In this article, you will learn how to do that quickly and efficiently.
1. Upload your custom font
First, you need to have the custom-font file on your local device.
Then, in Shopify admin, you go to Files > Upload file
2. Initialize font-face in the CSS file
Visit your Shopify admin again, go to Themes > Edit code > open assets/custom.css file.
Copy and paste this CSS code into the file.
For example:
If you want your font to be bolder, you can use font-weight: bold
If your font is italic, you can use
3. Apply the font to the theme
We have a list of variables that are applied to the entire theme including the heading and body.
For body text:
--font-body-family
--font-body-style
--font-body-weight
For heading:
--font-heading-family
--font-heading-style
--font-heading-weight
If you want to apply the font for the body, add this CSS code to the custom.css file:
For example:
If you want to apply the font for the heading, add this CSS code to the custom.css file:
For example:
Then, click Save and check the result.
Last updated