How to Add a Custom Font to Your Shopify Website
When it comes to building your brand’s identity, fonts play a huge role in making your Shopify store stand out. Fonts communicate personality, set the tone for your website, and make your text easy to read. While Shopify provides a selection of pre-loaded fonts to get you started, uploading a custom font can take your branding to the next level.
In this guide, I’ll walk you through the process of adding a custom font to your Shopify website, why you might want to use one, and everything you’ll need to get started.
Start with Shopify’s Pre-Loaded Fonts
Before diving into custom fonts, check out Shopify’s built-in font library. You can browse fonts directly within the Shopify theme editor (Online Store > Themes > Customize) under the Typography section.
Shopify’s pre-loaded fonts are a great starting point if you haven’t defined your brand fonts yet. These include popular, versatile options like Helvetica, Lato, and Open Sans—all free to use and already optimized for web performance.
But if you have a specific font in mind for your brand, here’s how to upload and use it.
Why Use a Custom Font?
Custom fonts help reinforce your brand’s identity and make your store visually memorable. By choosing a font that aligns with your logo, packaging, or overall aesthetic, you create a cohesive experience for your customers.
Step 1: Choose the Right Custom Font
When selecting a custom font, keep a few things in mind:
-
File Type: Shopify supports web-friendly font formats like
.woff
and.woff2
. These are optimized for fast loading and compatibility across browsers. Avoid using older formats like.ttf
or.otf
unless absolutely necessary.
-
Where to Find Fonts: Popular platforms to purchase or download fonts include:
- Google Fonts (Free and easy to use)
- Creative Market
- MyFonts
- Font Squirrel
- Font License: Ensure you purchase or acquire the proper license for your font. A font license determines how you can use the font (e.g., for personal or commercial purposes). Uploading an unlicensed font can lead to legal issues.
[Pro Tip: Fonts with a webfont license are ideal for use on websites.]
Step 2: Upload Your Custom Font to Shopify
Once you’ve chosen a font, it’s time to upload it to Shopify. Here’s how:
-
Access Your Theme Code:
- In Shopify, go to Online Store > Themes > Actions > Edit Code.
-
Upload Your Font:
- Under the Assets folder, click Add a new asset.
- Upload your font file (in
.woff
or.woff2
format).
Step 3: Add the Font to Your Theme’s CSS
To make your custom font available on your website, you’ll need to add a snippet of CSS to your theme’s stylesheet:
- Open the theme.liquid or theme.scss.liquid file in the Assets folder.
- Add the following code to declare your font:
@font-face {
font-family: 'YourCustomFont';
src: url('{{ 'your-font-file.woff' | asset_url }}') format('woff');
font-weight: normal;
font-style: normal;
src: url('{{ 'your-font-file.woff2' | asset_url }}') format('woff2'); font-weight: normal; font-style: normal; }
- Apply the font to specific elements (like headings or body text) using CSS selectors:
h1, h2, h3 {
font-family: 'YourCustomFont', sans-serif;
}
body {
font-family: 'YourCustomFont', sans-serif;
}
Step 4: Test Your Font
After saving your changes, preview your Shopify store to ensure the font displays correctly. Test it on multiple devices and browsers to confirm compatibility.
Final Thoughts
Shopify’s pre-loaded fonts are great for getting started, but uploading a custom font allows you to bring your brand’s personality to life. Just remember to use the right file type, get a proper font license, and follow these steps to integrate it seamlessly.
At Studio Kinde, we design Shopify website templates with customization in mind—including the ability to easily incorporate custom fonts. If you have any questions or need help adding your font, feel free to reach out!