Custom Font Installer
Use your own brand font on Shopify. Convert it to WOFF2 here, upload it to Content › Files, and paste one Custom Liquid section. Works with Dawn, Horizon and any Online Store 2.0 theme.
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.
1Add your font files
2Name the font and check each style
Read from the font file. Change it if you like; it’s the name your theme’s CSS uses.
Preview
3Convert, download and upload to Shopify
- In Shopify go to Content › Files and click Upload files.
- Choose the downloaded files. Keep their names: the code in step 4 finds each file by name.
Shopify renamed my file
If a file with the same name is already in Content › Files, Shopify adds a unique ID to the new one. Delete the old file and upload again, or change the name inside file_url in the code to match.
4Add the code to your theme
- Online Store › Themes › … › Duplicate, then Customize the copy.
- In the Header area on the left, click Add section › Custom Liquid. The header is on every page, so the font applies everywhere.
- On Dawn, set the section’s Top padding and Bottom padding to 0. Dawn gives a new Custom Liquid section 40 px of each, which leaves a blank strip under the header. Horizon’s section already starts at 0.
- Paste the code below and Save. Check headings, buttons and prices, then publish the copy.
How it works
- Your font files are read in this browser tab; the name, weight and style come from the font’s own name and OS/2 tables.
- Converting compresses every font table with Brotli into the W3C WOFF2 format. Nothing is uploaded.
- You upload the WOFF2 files to Content › Files in Shopify.
- The code adds an @font-face rule per file, using Shopify’s file_url filter to find each file by name, and points your theme’s heading or body font variables at it.
- One Custom Liquid section in the header applies it to every page.
Guides
Questions
Why can’t I pick my own font in the theme editor?
Shopify themes use the font_picker setting, which only lists fonts in the Shopify font library. A font of your own is loaded with an @font-face rule instead, which is what this tool writes.
Which font files can I use?
TTF, OTF, WOFF and WOFF2, one file per weight and style. Font collections (.ttc) hold several fonts in one file: export the single styles you need first. Variable fonts work as one file.
Is the WOFF2 conversion lossless?
Yes. Every table in the font is kept byte for byte and compressed with Brotli, as the W3C WOFF2 format specifies. Only a digital signature (DSIG table) is removed, because a signature can’t survive any re-encoding; browsers ignore it anyway.
Do I need an app?
No. The font files go in Content › Files and the code goes in a Custom Liquid section in the theme editor. Nothing to install, no theme code edits, and deleting the section removes the font.
Is my font uploaded to your server?
No. The font is read, previewed and converted in this browser tab. The converter itself is downloaded from this site the first time you click Convert.
Based on the W3C WOFF2 specification, Shopify’s file_url filter, Custom Liquid sections, Dawn and Horizon.