# Add custom fonts ![image](https://docs-assets.foxecom.app/zest-theme/customfonts_3y678jYd.png) 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. ![You need to own an files of the font](https://lh4.googleusercontent.com/hYGPtjRchtZhJW-6Mlg-lAUVfehOFM6j5zgItJL4zTTg5GQRX-jx5T9WsW5D5xqgtxbX1_Ct3bclVULNuJNX4YHotSeOM0cRTGSszx56KNB2Q7_pUcuZGWk4krOl2HVvDOqhETWEsev1X3_I82dKDP8) Then, in Shopify admin, you go to **Files** > **Upload file** ![Shopify admin => Files => Upload file](https://lh5.googleusercontent.com/tPZAbyRcblBfuAjs5s3SOwa_GXQLAjmF1l4Q_baNnrVkkBXntDmLLYjZo6HZMWXxu3pDzd_L9R6dIXTDthsur63JlFwp_bgvUhmkuwLGKssT61ARRmuFHDuMGaRhb2NIjEYFvlYlb5xX4nb_5UiH2q4) 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](https://lh6.googleusercontent.com/fsmilwV4va_Wq17mo4UFuti6PZE6PC2A1hFluTA0LZeKOIQoNuj7kf_GkqIsDp-6-yIDqZLaZsMB_7idQkW1EPS8J2P_SmhqB-DPWUgl7mTeATmBr1i-1ciUP7ZUCQnqPMSOlfqRdcTSNpffoMenGCc) ### 2. Initialize font-face in the CSS file Visit your Shopify admin again, go to **Themes > Edit code** > open **assets/custom.css** file. ![Access to the assets/custom.css file](https://lh6.googleusercontent.com/pJauCNXGgW2xBEeQLFtORH9Sg8-lD7uECiBsdwmKjy67MuM_jWWFH0XhpB2fm8Q1X4C93qxDgp13tk4144eEdOap1aNmsYwV49Zylzx4rQS5qr2kSYBk2dk0JnhQr1FDxLjwOMVr1pb1qZXR3101hrc) Copy and paste this CSS code into the file. ```css @font-face{ font-family: Name of font ; src : url( font-url ); } ``` For example: ```css @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`** ```css @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-style: italic`**](#user-content-fn-1)[^1] ```css @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: ```css :root { --font-body-family : font-name; --font-body-style : font-style; --font-body-weight : font-weight; } ``` For example: ```css :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: ```css :root { --font-heading-family : font-name; --font-heading-style : font-style; --font-heading-weight : font-weight; } ``` For example: ```css :root { --font-heading-family : SofiaSans --font-heading-style : italic; --font-heading-weight : bold; } ``` Then, click Save and check the result. [^1]: