All things Shopify and commerce
Hello Community,
We successfuly used this code on theme.css with Impact 6.1.0
.h0 {
font-family: "winlove";
font-size: var(--text-h0);
line-height: 1;
}
After updating to 6.2, it no longer loads our font.
Our font is a .ttf file stored in the assets folder.
We tried the same code above and it did not load and we tried the @font-face approach to define our font-family with defined file path. These approaches did not work, so we have not yet published the 6.2 theme of www.viridianbay.com.
Photo attached is how we want the custom font to appear on the home page.
How do we get our custom font to appear like it did in the old Impact theme?
Solved! Go to the solution
This is an accepted solution.
If you have your custom font added as an asset on shopify you can use the below font to theme.liquid file
{% unless settings.custom_font.system? -%}
<link rel="preload" href="{{ 'your-font-here.woff2' | asset_url }}" as="font" type="font/woff2" crossorigin>
{% endunless %}
This is an example of how we used the code to style h2 in the assets/theme.css file
h2 {
font-family: 'winlove', sans-serif;
}
I'm failing to install any custom fonts in the Impact theme, which I bought for the first time yesterday. Really hope there's a fix for this given the price point.
This is an accepted solution.
If you have your custom font added as an asset on shopify you can use the below font to theme.liquid file
{% unless settings.custom_font.system? -%}
<link rel="preload" href="{{ 'your-font-here.woff2' | asset_url }}" as="font" type="font/woff2" crossorigin>
{% endunless %}
This is an example of how we used the code to style h2 in the assets/theme.css file
h2 {
font-family: 'winlove', sans-serif;
}
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024