Customizing your store’s typography
Effectively communicating with users requires careful consideration of your store's typography. It serves as a visual representation of your store's identity through distinctive styles, encompassing factors like font size and spacing.
For additional information on customizing your store’s typography using the CMS, refer to the Customizing your store’s typography guide.
Before you begin
Before following this guide, ensure that you:
- Review the Best practices for using CSS handles article.
- Set up the Assets builder in your Store Theme app's
manifest.jsonfile. - Set up the Styles builder to version
2.xin your Store Theme app'smanifest.jsonfile. Note that previous versions of the Styles builder do not support the customization outlined in this guide.
Instructions
- Open your Store Theme app in your preferred code editor.
- Create a new folder named
fontswithin theassetsdirectory. - Place the font files inside the
assets/fonts/folder. Ensure font files have the extensions:.ttfor.woff. - In the
styles/configsfolder, create a new file namedfont-faces.css. - Use the
@font-facerule to declare the desired CSS properties for your website's typography. For example:
Fonts uploaded on the Assets Builder can be referenced in your CSS files by specifying their file path in the
srcproperty.
Using font faces
The font-faces.css file is a global configuration. Utilize the declared font faces using the font-family property to specify the desired font for a particular component. Here's an example: