Theme font guide
How to add a custom font to Shopify
What you’ll need
Your font files (TTF, OTF, WOFF or WOFF2, one file per weight and style, with a license that allows web use)
Somewhere to upload the converted files
How to get this: Somewhere to upload the converted files
In your Shopify admin: Content › Files › Upload files.
The theme editor (to add a Custom Liquid block; no code editing)
How to get this: The theme editor
- Online Store › Themes › Edit theme (on a copy of your theme if you want to test first).
- Add section or Add block › Custom Liquid, paste the code, then Save.
A duplicate of your theme to test on (optional, recommended, to preview the new font before customers see it)
How to get this: A duplicate of your theme to test on
- Online Store › Themes › … on your theme › Duplicate.
- Make the change on the copy, preview it, and publish only when it works.
Why the font picker doesn’t list your font
The Typography settings in Dawn, Horizon and other Shopify themes use the font_picker setting, which only lists fonts from the Shopify font library. Your own font has to be loaded with CSS instead.
Add your font in four steps
- Open the Custom Font Installer and add your font files: one file per weight and style, for example Regular, Bold and Italic. TTF, OTF, WOFF and WOFF2 all work.
- Check each file’s weight and style, then click Convert and download. You get WOFF2 files named like brand-400.woff2 and brand-700.woff2.
- In Shopify go to Content › Files › Upload files and upload them. Keep the names: the code finds each file by its name.
- Online Store › Themes › Customize. In the Header area click Add section › Custom Liquid, paste the code from the tool and Save. The font now applies to every page. On Dawn, also set the section’s Top padding and Bottom padding to 0: Dawn starts a Custom Liquid section with 40 px of each, which shows as a blank strip under the header.
Headings, body text or both
- Dawn reads its fonts from the CSS variables --font-heading-family and --font-body-family. The code sets them, so every heading or all body text follows.
- Horizon reads --font-heading--family, --font-subheading--family and --font-body--family. Its buttons and prices follow whichever of these the theme settings point them at.
- For other themes the code sets the font on h1–h6 and body directly. Pick “Only load the font” if you want to write your own CSS rules.
Why WOFF2
WOFF2 is the same font compressed with Brotli for the web. Every current browser reads it, and it’s usually about half the size of the TTF or OTF, or smaller, so pages load faster. The conversion is lossless: every glyph, kerning pair and OpenType feature is kept.
Check the license first
A desktop font license doesn’t always cover use on a website. Many foundries sell a separate web license. The installer warns when a file is marked “Restricted License embedding” by its maker.
Questions
Can I upload a font in the theme code editor instead?
Yes: Edit code › assets › Add a new asset, then use the asset_url filter. It works the same, but the font is tied to that theme copy and is lost if you switch themes. Files in Content › Files work with every theme.
Will a theme update remove my font?
No. The Custom Liquid section is saved in your theme’s settings, not in the theme’s code, so it stays when you update to a new version from the theme editor.
Related tools and guides
- Custom font not showing on Shopify? Fixes
Custom Font Installer
- Liquid Snippet Studio
More no-app theme code