Liquid error: font_url can only be used with a font drop - HELP!

Hi folks,

I’m just tidying up some issues which are slowing down our site and I’m coming across a 404 error code with the following showing:
Screenshot 2021-07-14 at 14.52.06.png

This particular error is putting a 320ms delay on our site loading, so I’d like to get it out of the way.

I cannot to any degree figure out what this could be - can anyone assist at all?

Thanks!

I got the same error in recent days, Please HELP!

The solution for this was explained to me on another forum - it turns out that I was using a non system font - if you change that the error will go away!

How can I find what non system font I use? Thanks a lot

it seems they system cannot use the variable font_url properly. how can I fix this

I’m no expert, but it seems as if the system is trying to find a font that doesn’t have an alternative format (ie bold, semibold etc)

Either change your font to a system font (you can do this in your theme editor, system fonts appear at the top of the typography section) or you’ll have to find a code which will replace a non-existent font face with one that already exists.

font_url is a liquid filter, can any one help this?

I don’t change the font of the theme, however, I encountered this problem

This problem can be related with wrong font variable name. Please check if the font variable name is the same in theme.liquid and settings_schema.json.

I have commented this lines:

For some reason this line
{%- assign base_font_bold = base_font | font_modify: ‘weight’, ‘bold’ -%}

returns a null value for base_font_bold. That causes an error here:

After that, I checked the website and I see that the fonts are not equal so I edited the theme.css.liquid file.

For some reason, some OOTB code from my theme wasn’t working nicely. I found the right code and paste it on all places where the font-family was mentioned.

/* custom added to change all fonts to be the same */
font-family: {% if fnt_df_bd == ‘1’ %}{{font-stack-body}}{% elsif fnt_df_bd == ‘2’ %}{{font-stack-heading}}{% else %}{{font-stack-sub}}{% endif %};