Problem with custom fonts

Shopify Partner
10 0 1

So, we have a woff custom font file. And it works fine on my local. But when I load it to Assets folder and embed it using font-face, the font can't be decoded, I'm getting the error: "OTS parsing error: incorrect file size in WOFF header" (woff2 font has the same problem). 

I'm following the link to the font given by asset_url filter, downloading the font file from there, and trying to use it on my local. And - it shows me the same error! More than that - the file from Shopify is 42kb, while the original file is 23kb!


So the question is - does Shopify corrupt fonts? And how to fix this?

Replies 6 (6)
Shopify Partner
3318 628 950

Hi @dmogil,


Try the instructions below but if this does not work, you can try the other solution I included in my website


We are volunteering to help    |      Likes and Accept as Solution  will be much appreciated.✌
Having trouble?  Hire us! For fast reply, shoot us a message using chat at

Check how to sell everywhere with Shopify POS. Keep your stuffs private. Refrain from giving unnecessary access to your store.
Shopify Partner
10 0 1

Thanks, but it is not about my actual problem - font files been corrupted

New Member
1 0 0

I am having the same issue on my friends site. This video doesn't solve the issue. does anyone else have a solve for fixing the corrupted fonts issue?

New Member
2 0 1

Ran into the same Issue... seems to be a very ugly bug in shopify.

As soon as you upload webfonts in woff or woff2 (awfully no other formats like .otf is supported when uploading it into the assets folder of your theme) the file gets corrupted. We got a workaround, just upload into the files section within your shop settings, then use the file_url instead of the asset_url. This workaround worked for us.

New Member
2 0 0

nice, this solved my problem.

the woff2 / woff files need to file upload, then load them into theme.liquid

<link rel="preload" href="fileurl.woff2" as="font" type="font/woff2" crossorigin="anonymous">


refer from this article point no.5


3 0 0

This worked for me as well. Thank you.