Font loading issue from assets folder- OTS loading error

EsoftNow
Shopify Partner
4 0 2

Recently having issues on using custom fonts uploaded on Shopify theme assets folder. When a font is connected & used on theme from the theme asset folder via @font-face , it faces issues on loading properly, although the exact same font is being used on older uploaded themes.

 

Error notices on console:

"Failed to decode downloaded font: <URL>"

"OTS parsing error: Failed to convert WOFF 2.0 font to SFNT"

"OTS parsing error: incorrect file size in WOFF header"

 

At first I thought the font got corrupted somehow. So repackaged the font correctly (though it wasn't corrupted, but still tried to be safe)  & then re-uploaded on the theme asset folder. But still the error persists. Also tried other possible solutions. But none works when the font is uploaded & used from theme asset folder.

 

If anyone is facing the same & found a workaround please, let me know. Or share your experience, so that we can understand what is happening!

 

Appreciate the help.

 

Shopify Theme Custom font loading issue - console screenshot.png

Replies 2 (2)
mikedoohans
Visitor
2 0 0

try to read this article : https://sections.design/blogs/shopify/preloading-fonts

 

read #5. Include the preload directive in theme.liquid

Firestone
Tourist
9 0 1

I am having a similar issue. Did you find a way to resolve this?

 

Thank you!