Skip to content

Instantly share code, notes, and snippets.

@IliasHad
Last active June 28, 2019 15:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IliasHad/11813ca996fec6a6650af89b378cb99d to your computer and use it in GitHub Desktop.
Save IliasHad/11813ca996fec6a6650af89b378cb99d to your computer and use it in GitHub Desktop.
Preload Web Font in shopify
<style>
@font-face {
font-family: 'Montserrat'; Replace Montserrat with your web font name
font-style: normal;
font-weight: 400; Replace it with your font weight and you'll find it google web font helper
font-display: swap; Don't Change it
src: local('Montserrat'), local('Montserrat-Regular'), Replace Montserrat with your web font name
url(https://cdn.shopify.com/s/files/1/0077/8295/7119/files/montserrat-v12-latin-regular.woff2) format('woff2'), Replace Link with web font file url specific for this font weight and with woff2 file type ( admin > settings > files )
url(https://cdn.shopify.com/s/files/1/0077/8295/7119/files/montserrat-v12-latin-regular.woff) format('woff'); Replace Link with web font file url specific for this font weight and with woff file type ( admin > settings > files )
}
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 700;
font-display: swap;
src: local('Montserrat Bold'), local('Montserrat-Bold'),
url(https://cdn.shopify.com/s/files/1/0077/8295/7119/files/montserrat-v12-latin-700.woff2) format('woff2'), Replace Link with web font file url specific for this font weight and with woff2 file type ( admin > settings > files )
url(https://cdn.shopify.com/s/files/1/0077/8295/7119/files/montserrat-v12-latin-700.woff) format('woff'); Replace Link with web font file url specific for this font weight and with woff file type ( admin > settings > files )
}
and you can also add more font style
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment