Shopify themes, liquid, logos, and UX
I'm trying to use custom font on my website I added the woff and woof2 files in my assets and inserted the following code inside the theme.liquid file:
<style>
@font-face {
font-family: "neutra_textbook";
src: url('{{ "neutratextbook.woff2" | asset_url }}') format("woff2"),
url('{{ "neutratextbook.woff" | asset_url }}') format("woff");
font-weight: normal;
font-style: normal;
}
</style>
but it give me this error:
downloadable font: rejected by sanitizer
Hi @DeLeo , Did you try to download the font from other source, maybe the font files are corrupted.
I fixed it by loading the same font files inside the shopify "files" section and now it works, still not understanding why it don't works if fonts are loaded insde assets
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025