I’ve been trying to use a custom font, but no matter what I try it doesn’t show on the page, so i thought I could ask some help here.
I tried uploading the file to the assets folder and included it like this
@font-face {
font-family: 'Font-name';
src: url('{{ "Font-name.woff2" | asset_url }}') format('woff2'),
url('{{ "Font-name.woff" | asset_url }}') format('woff'),
url('{{ "Font-name.eot" | asset_url }}') format('eot'),
url('{{ "Font-name.ttf" | asset_url }}') format('ttf');
}
but it doesn’t work. I also uploaded the files to Content → Files, and copied the full URL from there, but it’s the same thing.
I pasted the font url in the browser to make sure it’s valid, and it is, the file is downloaded just fine.
I made a simple html page (outside shopify) and used the font, to make sure there isn’t a problem with the font files themselves, and there the font shows up just fine in all browsers - just to specify, the font is not installed on my system, the files where only present in the same folder as the css file.
I have tried this with two different fonts, and they both have the same issues.
One of the fonts was (and still is) successfully used on a shopify 1.0 theme, the problems seem to be with a new 2.0 theme, so maybe there’s something here I’m missing.