Monday, May 9, 2022

[FIXED] Where do I define @font-face in shopify?

Issue

I upload some font-related files in assets in Shopify. But I don't know where and how to define the below code.

@font-face {
    font-family: 'FreeSansBold';
    src: url('FreeSansBold.eot');
    src: url('FreeSansBold.eot?#iefix') format('embedded-opentype'),
        url('FreeSansBold.woff2') format('woff2'),
        url('FreeSansBold.woff') format('woff'),
        url('FreeSansBold.ttf') format('truetype'),
        url('FreeSansBold.svg#FreeSansBold') format('svg');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}


Solution

Instead of creating a new file and increasing the https count you can directly include the code in theme.css file of your theme



Answered By - Jyoti Ahluwalia
Answer Checked By - Pedro (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.