Z O B A E R

Loading

Guide Shopify guide

Shopify Custom Font: Change It or Upload Your Own

Change your Shopify font in Dawn or Horizon, upload your own brand font with tested code, and fix a custom font that won't show on mobile.
Zobaer Hossain
Zobaer H.Shopify Select Partner · 10+ years
Shopify custom font guide: change the font or upload your own font file, by Zobaer H.

Fonts do a lot of quiet work in a store. The right one makes your brand feel familiar. The wrong one, or a font that fails to load, makes even good products look cheap. The good news is that a Shopify custom font is easy to set up once you know where each setting lives.

In this guide I show you two things. First, how to change font on Shopify with the built-in settings in Dawn and Horizon, Shopify’s free themes. Second, how to upload font to Shopify as your own file and use it everywhere, with code I tested in a real browser. I have set up brand fonts on many client stores, and these are the steps I use.

Here is what you will learn:

  • How to change font on Shopify, plus font size and color, without code
  • How to upload font to Shopify and load it with one short piece of CSS
  • Where the code works, and where Shopify blocks it
  • How to fix a Shopify custom font that doesn’t work on mobile

How to change font on Shopify with the font library

Every free Shopify theme uses the Shopify font library. It holds system fonts plus a selection of open-source web fonts, all free to use on any Shopify store. Try this first. If you find a font you like here, you don’t need a Shopify custom font or any code at all.

Change the font in the Dawn theme

  1. In your Shopify admin, go to Online Store, then Themes, and click Edit theme.
  2. Click the Theme settings icon (the gear) and open Typography.
  3. Under Headings, click Change next to the current font.
  4. Pick a new font from the list and click Select.
  5. Do the same under Body for paragraphs, menus and buttons.
  6. Click Save.
Change font on Shopify Dawn: Theme settings, Typography, Headings and Body font pickers
Dawn has two fonts: one for headings and one for body text.

Change the font in the Horizon theme

Horizon gives you four font slots instead of two:

  1. Open the theme editor and click the Theme settings icon.
  2. Open Typography. Under Fonts, you see Body, Subheading, Heading and Accent.
  3. Click a font, choose a new one, and confirm.
  4. Scroll down to Text presets. Each heading level, from Heading 1 to Heading 6, has a Font setting. Here you decide if it uses the Heading or the Accent font.
  5. Click Save.
Shopify custom font settings in Horizon: Body, Subheading, Heading and Accent fonts plus text presets
Horizon has four fonts and a set of text presets for paragraphs and headings.

Not sure which theme fits your brand better? I compare both in Dawn vs Horizon.

Change the font size and font color

Size and color sit in different places in each theme.

  • Font size in Dawn: in Typography, each font has a Scale slider. Headings go from 100% to 150%, and body text from 100% to 130%.
  • Font size in Horizon: in Typography, under Text presets, set the Size for Paragraph (10 to 18 px) and for each heading level. Horizon notes that sizes scale for all screen sizes, so large headings shrink on phones.
  • Font color in Dawn: go to Theme settings, then Colors. Open a color scheme and change Text. Every section that uses that scheme updates.
  • Font color in Horizon: in Typography, the Colors group has a Text color. It is the default for theme sections.

Keep text dark on a light background, or light on a dark one. Pale grey text looks soft, but many shoppers struggle to read it on a phone in daylight.

How to upload font to Shopify (your own font file)

Maybe your brand already has a font, and it isn’t in the library. You can still upload font to Shopify and use it. A Shopify custom font you upload won’t appear in the font picker, though. Shopify’s picker only lists library fonts. So you load it with a short piece of CSS instead. It takes about 10 minutes.

Step 1: Check the license and the file format

Before you upload font to Shopify, make sure you are allowed to use it on a website. Many fonts you buy come with a desktop license only. That covers print and design files, not websites. Check that your license includes web use, and read any limits, such as page views. Free fonts under an open license, like the SIL Open Font License, can be used on a website.

Next, check the file type. Browsers need web font files:

FormatUse it?Notes
WOFF2Yes, firstSmallest file, all modern browsers
WOFFYes, as backupFor older browsers
TTF / OTFConvert firstDesktop formats, much bigger
EOT / SVGNoOld formats, not needed

If you only have a TTF or OTF file, convert it to WOFF2 with a font converter, but only if your license allows it. Upload one file per weight you need, for example Regular and Bold.

Step 2: Upload the font to Content > Files

  1. In your Shopify admin, go to Content, then Files.
  2. Click Upload files and choose your .woff2 (and .woff) files.
  3. When the upload is done, click the link button next to each file. This copies its full address. It usually starts with https://cdn.shopify.com/s/files/.
  4. Paste each link into a note. You need them in the next step.

Use Files, not the theme’s code editor. Shopify’s developer docs say that uploading some fonts to the theme’s assets folder through the admin code editor can corrupt the file. Files from Content also stay in place when you change or update your theme.

Step 3: Add the Shopify custom font code to Custom CSS (Dawn)

Shopify’s help page on adding custom CSS lists what each box allows. The theme-wide box blocks the @import, @charset and @namespace rules, but not @font-face, so your font code works there. The Custom CSS box inside a single section is stricter. It allows only @media, @container, @layer and @supports, so your font code fails there.

  1. Open the theme editor and click the Theme settings icon.
  2. Scroll to the bottom and open Custom CSS.
  3. Paste the code below. Replace the three links with your own links from Files.
  4. Change Brand Sans to your font’s name. Use the same name in every place.
  5. Click Save.
@font-face {
  font-family: "Brand Sans";
  src: url("https://cdn.shopify.com/s/files/1/XXXX/files/BrandSans-Regular.woff2?v=1") format("woff2"),
       url("https://cdn.shopify.com/s/files/1/XXXX/files/BrandSans-Regular.woff?v=1") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Brand Sans";
  src: url("https://cdn.shopify.com/s/files/1/XXXX/files/BrandSans-Bold.woff2?v=1") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
html:root {
  --font-body-family: "Brand Sans", sans-serif;
  --font-heading-family: "Brand Sans", sans-serif;
}
Upload font to Shopify: font file in Content, Files, and the @font-face code in Theme settings, Custom CSS
Upload the file, copy its link, and paste it into the theme-wide Custom CSS box.

Here is what the code does. The @font-face blocks tell the browser where your font files are. font-display: swap shows text in a fallback font while your font loads, so the page is never blank. The last part sets your Shopify custom font as Dawn’s body and heading font. Dawn uses these two values for almost all text, so headings, menus, buttons and prices all change together.

Want the new font for headings only? Delete the –font-body-family line. For body text only, delete the heading line. Did you only upload a Regular file? Then delete the second @font-face block, and the fallback line with .woff if you have no WOFF file.

Step 4: The same code for Horizon

Keep the same @font-face blocks. Only replace the last part, because Horizon names its font values differently:

html:root {
  --font-body--family: "Brand Sans", sans-serif;
  --font-subheading--family: "Brand Sans", sans-serif;
  --font-heading--family: "Brand Sans", sans-serif;
  --font-accent--family: "Brand Sans", sans-serif;
}

Remove any line you want to keep from the theme settings. For example, keep only the heading and accent lines to use your Shopify custom font for titles and leave body text alone.

I tested both versions of this Shopify custom font code in a real browser, on a desktop screen and on a phone-sized screen. The real font files loaded, including one from Shopify’s Files address. Headings, paragraphs, bold text and buttons all switched to the new font. It also worked no matter where Shopify places the Custom CSS on the page, because html:root wins over the theme’s own setting.

For developers: load the font in theme.liquid

If you are happy to edit code, you can load the font in layout/theme.liquid instead. Duplicate your theme first. Then paste this just above {{ content_for_header }}:

<style>
  @font-face {
    font-family: "Brand Sans";
    src: url("{{ 'BrandSans-Regular.woff2' | file_url }}") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
</style>

Here the file_url filter finds the file in Content, then Files, by its name. This only works in a .liquid file. Keep the html:root part in Custom CSS as before. Remember that code edits inside the theme may need to be redone after a theme update.

Which way should you use?

Each option fits a different need. This is how I choose on client stores:

WayBest forCode?Note
Font libraryMost storesNoSafe on theme updates
Theme Custom CSSYour own brand fontPaste onlySafe on theme updates
theme.liquidDevelopersYesRedo after updates
Section Custom CSSStyling one sectionYesCan’t load fonts

Start with the font library. It is the quickest way to change font on Shopify. It is free, and every font comes in WOFF2 and WOFF already. Choose a Shopify custom font only when your brand truly needs one. Two font families are plenty for most stores, and each extra weight is one more file shoppers must download. If you are moving to a new theme, plan your fonts as part of it. My guide on how to change your Shopify theme covers the rest.

Common problems with a Shopify custom font

Most font problems come from a few small mistakes. Here is how I find and fix them.

The Shopify custom font is not working on mobile

This is the most common complaint. Often the font never loaded at all. You see it on your computer because the font is installed there, or your browser saved an old copy. A shopper’s phone has neither, so it shows the fallback font. Open your store in a private window or on your phone to see what shoppers really see.

Shopify custom font not working on mobile: fallback font on a phone versus the fixed custom font
If the font only works on your own computer, check these six things.

Then check these causes:

  • Liquid in the wrong place. Code like {{ ‘font.woff2’ | file_url }} only works in .liquid files. In base.css or in a Custom CSS box, it stays as plain text, so the link breaks. I tested this, and the font fails to load. Paste the full link instead.
  • Curly quotes. Code copied from a document or chat can turn ” into “ ”. CSS ignores curly quotes, so the whole rule fails. Retype the quotes.
  • Names don’t match. The name in @font-face must match the name you use, letter for letter.
  • Font hosted somewhere else. Browsers only load fonts from another website if that site allows it. Links from file-sharing services often fail. Files from Shopify’s Files page work, because Shopify allows them to load on any store.
  • Wrong format. Upload WOFF2 and WOFF, and make sure each format() matches its file.

Only the headings change (or only the body)

This happens when the code targets tags like h1 or body directly. Themes set fonts on many elements, such as buttons, menus and prices, so some text keeps the old font. Use the theme’s font values from Step 3 or 4 instead. They reach all text that uses each font.

Bold text looks blurry or fake

If you only upload the Regular file, the browser fakes bold by thickening the letters. It looks rough. Upload the real Bold file and add a second @font-face block with font-weight: 700, as in the code above.

The old font still shows after you replace the file

Browsers keep font files for a long time. If you replace a file, copy its link again from Files and update your code, then check in a private window.

The uploaded font doesn’t appear in the font picker

That is normal. The font picker in theme settings only lists Shopify library fonts. Your uploaded Shopify custom font is applied by the code, not by the picker. The picker setting can stay as it is.

Frequently asked questions

Can you add custom fonts to Shopify?

Yes. Upload the WOFF2 file to Content, then Files, and load it with an @font-face rule in Theme settings, Custom CSS. It won’t appear in the font picker, but it will show on your store.

How do I upload my own font to Shopify?

To upload font to Shopify, go to Content, then Files, click Upload files and choose your font file. Copy its link, paste it into the @font-face code from this guide, and add that code to the theme-wide Custom CSS box.

Why is my Shopify custom font not working on mobile?

Usually the font never loaded, and your computer shows it because it is installed there. Check for Liquid inside a .css file, curly quotes, a font name that doesn’t match, or a file hosted outside Shopify.

How do I change the font on the Shopify Dawn theme?

To change font on Shopify Dawn, open the theme editor, click the Theme settings icon, then Typography. Click Change under Headings or Body, pick a font, click Select, then Save.

How do I change the font size in Shopify?

In Dawn, use the Scale sliders in Typography. In Horizon, set the Size for Paragraph and each heading under Text presets in Typography.

Can I use @font-face in a section’s Custom CSS?

No. Section Custom CSS only allows @media, @container, @layer and @supports. Put @font-face in the theme-wide Custom CSS box instead.

A clear, readable font that loads on every phone does more for your store than a fancy one that fails. For more practical guides, see my Shopify tips. If you would rather have your fonts and design handled for you, I set up brand fonts as part of my Shopify store redesign service. Message me on WhatsApp and I will take a look.

Zobaer Hossain, Shopify designer

Written by Zobaer H.

Shopify Select Partner with 10+ years of experience and 5,000+ clients. I design and build Shopify stores, and I write these guides from real client work.

Shopify Select Partner badge

In this guide

    ★★★★★ 4.9 from 1,350+ client reviews

    Let's start

    Ready to start your store?

    Send me your idea or store link. I'll reply with honest advice and a fixed quote.

    ✓ Free quote✓ Fixed price✓ You own everything