ZEST theme
Try Zest freeResourcesOther solutions
  • What is Zest theme
  • Changelog
  • Refund policy
  • Support policy
  • Getting started
    • Install Zest theme
    • Set up my store as Zest demo
    • Update Zest theme
    • Theme license & Transfer
  • build for success series
    • Landing page like puravida
  • Page's global sections
    • General settings
    • Announcement bar
    • Banner logo 🔥
    • Header
    • Footer
    • Menu
      • Add a banner to mega menu
      • Add products to mega menu
      • Add collections to mega menu
      • Add custom cards to mega menu
      • Customize a hovering menu
    • Mobile navigation bar
    • Age verifier pop-up
    • Pop-up
  • Theme sections
    • Auto-scrolling promotion
    • Before/ After image slider
    • Blog posts
    • Collage tab
    • Collapsible tab
    • Collection list
    • Collection list slider
    • Collections showcase 🔥
    • Collection tab
    • Contact form
    • Countdown timer
    • Custom content
    • Custom liquid & HTML
    • Favorite collection 🔥
    • Favorite products
    • Featured product
    • Featured product slider
    • Featured collection
    • Gallery images
    • Handpicked products
    • Highlight text with image 🔥
    • Image with text
    • Image with text overlay
    • Image with text slider
    • Layered images 🔥
    • Logo list
    • Lookbook
    • Map
    • Mixed image cards 🔥
    • Multicolumn
    • Newsletter
    • Products bundle
    • Product tabs
    • Promotion banner 🔥
    • Press
    • Rich text
    • Slideshow
    • Testimonials
    • Video
    • Video hero
  • Theme settings
    • General settings
    • Animations
    • Cart
    • Checkout
    • Color swatches
    • Colors & Color schemes
    • Currency format
    • Cookies banner
    • Layout
    • Product card
    • Product quick view
    • Search
    • Social media
    • Theme style
    • Typography
  • Collections & Products
    • Product page
      • Product template
      • Product description
      • Breadcrumbs
      • Product information
      • Recently viewed products
      • Product recommendations
      • Quick order list 🔥
    • Collection page
      • Collection template
      • Collection sections
        • Collection banner
        • Product grid
    • Collections list page
  • Languages & Countries/Regions
    • Languages
    • Countries/ Regions
  • Other pages
    • 404 page
    • About us
    • Blogs
    • Blog posts
    • Cart & Checkout
    • FAQs page
    • Password
    • Search page
  • FAQs
    • Generic
      • Add custom fonts
      • Add custom CSS
      • Add custom badges to the product card and product page
      • Add gift wrap option to my cart
      • Add product review apps to my theme
      • Change the copyright text at the footer
      • Compare Zest with other Shopify themes
      • Does Zest support RTL languages?
      • JavaScript events for developers 🔥
      • How to migrate your Zest theme to version 7.0.0
      • My store has a low speed score - How can I improve it?
      • Show Payment icons on the Footer 🔥
    • Product page
      • Add a size chart to your product page
      • Add recipient fields to my gift card product
      • Edit product breadcrumbs using metafields
      • Set up quantity rules and volume pricing 🔥
    • Shopify functions
      • Combined listings app 🔥
      • Does Zest support Section groups?
      • Get to know dynamic checkout buttons
Powered by GitBook
On this page
  • 1. Upload your custom font
  • 2. Initialize font-face in the CSS file
  • 3. Apply the font to the theme
  1. FAQs
  2. Generic

Add custom fonts

A guide to add custom fonts to your store

PreviousGenericNextAdd custom CSS

Last updated 1 year ago

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.

@font-face{
  font-family: Name of font ;
  src : url( font-url );
}

For example:

@font-face{
  font-family: SofiaSans;
  src : url(https://cdn.shopify.com/s/files/1/0642/0565/2198/files/SofiaSans-Regular.ttf?v=167393855 );
}

If you want your font to be bolder, you can use font-weight: bold

@font-face{
  font-family: SofiaSans;
  src : url(https://cdn.shopify.com/s/files/1/0642/0565/2198/files/SofiaSans-Regular.ttf?v=167393855 );
  font-weight: bold;
}

If your font is italic, you can use

@font-face{
  font-family: SofiaSans;
  src : url(https://cdn.shopify.com/s/files/1/0642/0565/2198/files/SofiaSans-Regular.ttf?v=167393855 );
  font-weight: bold;
  font-style: italic;
}

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:

:root
{
--font-body-family : font-name;
--font-body-style : font-style;
--font-body-weight : font-weight;
}

For example:

:root
{
--font-body-family : SofiaSans;
--font-body-style : italic;
--font-body-weight : bold;
}

If you want to apply the font for the heading, add this CSS code to the custom.css file:

:root
{
--font-heading-family : font-name;
--font-heading-style : font-style;
--font-heading-weight : font-weight;
}

For example:

:root
{
--font-heading-family : SofiaSans
--font-heading-style : italic;
--font-heading-weight : bold;
}

Then, click Save and check the result.

You need to own an files of the font
Shopify admin => Files => Upload file

After selecting the file and uploading it, choose the ( ) button to copy the URL of your uploaded font.

Click the button to get the font url
Access to the assets/custom.css file