Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi there,
How can I generate a CSS @font_face declaration to use in theme.liquid for a Shopify-hosted font, archivo_n4, for example. In other words I want to use the Archivo font that's already hosted in Shopify and I want to include it in my theme.liquid (and custom.css) file using Liquid.
Thanks!
I
In your theme.liquid document, add the accompanying Fluid code bit to characterize the @font-face statement:
fluid
{% catch fontUrl %}https://cdn.shopify.com/s/textual styles/archivo_n4.woff{% endcapture %} @font-face { text style family: 'Archivo'; src: url({{ fontUrl }}) format('woff'); textual style weight: ordinary; textual style: typical; }
For more data click here