Personalized checkout and custom promotions with Shopify Scripts
Issue: I added the font file to the Assets folder, updated the code, checked the devtools and it was showing a network status code of 200. The item told me it was displaying the correct font, but the font visibly remained a default.
Reason: There is an internal Shopify bug that's been around since at least 2022 that corrupts woff files on load to the assets.
Solution: Add the font to the Files folder and call it from there.
Add to this folder -> https://admin.shopify.com/store/*store code*/content/files
Use code like this:
Add just below {{ content_for_header }}
<style>
/* 1. declare font */
@font-face {
font-family: 'Maka';
src: url('{{ 'https://cdn.shopify.com/s/files/files/Maka.woff' }}') format('woff'),
src: url('{{ 'https://cdn.shopify.com/s/files/files/TAYMakawaoRegular.woff2' }}') format('woff2')
}
</style>
add at the very end of <head> section:
<style>
/* 2. At the end of all things, override the CSS variable. placing this at the bottom makes it the top priority. */
:root {
--font-heading-family: 'Maka';
}
</style>
PS. always make sure that you have a backup font file like a woff2. Browsers like it.
references: where i found my solution
Hi @nicohalsema
Please attach your store url & password (if applicable) each time you post a question to let me check then give you the solution
Yep, that's a pity Shopify started doing this and still not fixed.
Though, I guess it may be another reason to avoid modifying your theme code.
All of this can be done with "Custom CSS"/"Custom liquid" settings -- will help with future theme updates.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025