Losing my mind a bit. The old way to add custom fonts is not working anymore. Fonts were added as assets, .woff & .woff2 files - I added some custom css to the content block which seems to trigger a change, but not pulling in the exact font. I added @font-face style in multiple places, taking it out in one, trying it in another, etc. , main css and just nothing is working. I checked the .woff & .woff2 files and they are showing the correct font but it is just shifting to Times New Roman which happened to me in the Impulse theme for a client, but I eventually figured it out. What worked there is not working in Symmetry - any help appreciated!
Since the asset is .css and not .css.liquid, Shopify does not process the liquid code and that’s why I see it like this. Either rename the asset or output this inside …<.style> in your HTML;
the code uses file_url filter but you’ve said that font files are added to the Assets (and they are there), so need to use asst_url instead.
You have been so helpful & I appreciate it! So I went in with another woff & woff2 file I used on another client just to double check and even still it’s not loading.
I miss the old way where you just put the font-face at the bottom of the css and then called out everything you wanted to change.
I’ve tried the same in my test store – uploaded files to Assets and added code as custom liquid section using asset_url and received the same error in console.
Then I’ve uploaded to Files and changed filter to file_url and it seems to work fine.
Frankly, for small mods I’d prefer using Files – you can use Custom liquid to output CSS rules and do not need to edit theme code, but anyways.
That worked!! Thank you - the documentation for custom fonts used to mention always adding to assets - so good to know they can go into files now. Really appreciate all of your help!