Adding a custom font to your Shopify theme can be a great way to maintain brand consistency, but itâs important to consider a few things before proceeding:
Performance: Custom fonts can slow down your site, especially if they arenât optimized for web use. The longer your site takes to load, the more likely you are to lose visitors.
Licensing: Make sure you have the right to use the font on your website. Some fonts are licensed for personal use only and require purchasing a commercial license for online use.
Compatibility: While WOFF/WOFF2 formats are widely supported, ensure that all your usersâ browsers will render the font correctly.
Fallbacks: Always have a fallback font in case the custom font doesnât load. This will ensure your website remains functional and legible.
If you decide to proceed, hereâs how you might add the font to your Shopify store:
Upload your font files: Go to the Assets directory in your Shopify theme code and upload your WOFF/WOFF2 files there.
Edit the CSS: In your Theme.scss.liquid or style.css.liquid file, you will need to write a @font-face rule that defines the font and points to the uploaded font files. Hereâs an example of what that might look like:
Please remember to replace âYourFontNameâ and âYourFontFile.woff2â with the actual names of your font and files.
While these steps can guide you through the process, if youâre not comfortable editing your theme files, itâs a good idea to consult with a Shopify Expert or a developer who can assist you further.
How could you add two types of font ? I already added my first custom font but want to write some text on the website in another custom font
Also on the first custom font, How could I add an UltraBold format for some Heading/titles (but I only want this on some of them, not across the whole site)