Return to Online Store → Themes → Edit theme, then open Theme settings → Custom CSS.
If there is already code in the Custom CSS box, do not delete or replace it. Scroll to the bottom and add the code below under your existing code.
@font-face {
font-family: "YOUR FONT NAME";
src: url("YOUR SHOPIFY FONT FILE LINK");
font-weight: 400;
font-style: normal;
font-display: swap;
}
:root {
--font-heading--family: "YOUR FONT NAME", serif;
--font-subheading--family: "YOUR FONT NAME", serif;
--font-accent--family: "YOUR FONT NAME", serif;
}
Replace the placeholders
You will need to replace both placeholders throughout the code:
1. YOUR FONT NAME
Replace this with the name of your font. Use the exact same font name everywhere it appears in the code.
For example, if your font is called Canela, every instance of YOUR FONT NAME should become Canela.
2. YOUR SHOPIFY FONT FILE LINK
Replace this with the complete font file link you copied from Content → Files in Shopify.
Choose the correct font type
At the end of each font family line, you will see serif:
--font-heading--family: "Canela", serif;
If your font is a serif font, leave serif as it is.
If your font is a sans serif font, change serif to sans-serif:
--font-heading--family: "Canela", sans-serif;
Make the same change on all three font family lines.
Example
For a serif font named Canela, your finished code would look like this:
@font-face {
font-family: "Canela";
src: url("YOUR SHOPIFY FONT FILE LINK");
font-weight: 400;
font-style: normal;
font-display: swap;
}
:root {
--font-heading--family: "Canela", serif;
--font-subheading--family: "Canela", serif;
--font-accent--family: "Canela", serif;
}
Once you have replaced the font name and font file link, click Save.
Then preview your storefront and check the headings, subheadings, and accent text to make sure the font is displaying correctly.