Why isn't my imported font displaying on my Maker theme?

Hi

I have an issue with the font import.
Font called ‘Neuropolitical’ has been downloaded, converted to woff2, added to Assets as neuropolitical.woff2.

Then i placed this code to ‘theme–critical.css’:

@font-face {
font-family: “neuropolitical”;
src: url(‘neuropolitical.woff2’) format(‘woff2’),
url(‘neuropolitical.woff’) format(‘woff’);
}
h1, h2, h3 {
font-family: “neuropolitical”!important;
}

Unfortunately font doesn’t display on:

https://8bx5ahd86ab720ef-78443479386.shopifypreview.com

Hi @SuzyKot
If you have uploaded the fonts to assets then you must fetch it with the help of a liquid object. In your case this is not possible with .css file you need to create a snippet name the snippet fonts and then add the below code to fonts snippet which is created.


Then add the below code in theme.liquid or in the file you have the theme–critical.css fetched But make sure you add the below code before the theme–critical.css

{% render 'fonts' %}