Sections<\/strong> and copy and paste the below code inside the <style><\/style> brackets. Remember to replace “your-font-file” with the file name of your custom font and “My Custom Font” with the name of your font.<\/p>\n\n\n\n@font-face {\n font-family: 'My Custom Font';\n src: url('{{ 'custom-font.woff2' | asset_url}}') format('woff2'), url('{{ 'custom-font.woff' | asset_url}}') format('woff');\n font-weight: normal;\n font-style: normal;\n}\n\/* To replace the titles only *\/\n\nh1, h2, h3, h4, h5, h6 {\n font-family: 'My Custom Font', sans-serif !important;\n}\n\/* To replace the body\/paragraphs only *\/\n\np, li, span {\n font-family: 'My Custom Font', sans-serif !important;\n}<\/pre>\n\n\n\nSave when you’re done and exit the Code Editor. You should see your changes, but if you don’t, remember to clear your browser cache.<\/p>\n\n\n\n
Update: Alternative Method<\/h2>\n\n\n\n
If the above method doesn’t work, try uploading your font file under Content > Files <\/strong>instead. Next, copy the link and use this CSS code instead, replacing “your-font-link” with the link you just copied:<\/p>\n\n\n\n@font-face {\n font-family: 'My Custom Font';\n src: url('{{ 'your-font-link}}') format('woff2'), url('{{ 'your-font-link}}') format('woff');\n font-weight: normal;\n font-style: normal;\n}\n\/* To replace the titles only *\/\n\nh1, h2, h3, h4, h5, h6 {\n font-family: 'My Custom Font', sans-serif !important;\n}\n\/* To replace the body\/paragraphs only *\/\n\np, li, span {\n font-family: 'My Custom Font', sans-serif !important;\n}<\/pre>\n\n\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"
If you have your heart set on a specific font and need it added to your Shopify theme, here’s a quick step-by-step tutorial to show you how to do that.<\/p>\n","protected":false},"author":1,"featured_media":5666,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[310],"tags":[328,364],"class_list":["post-5665","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-how-to","tag-shopify-tutorial"],"_links":{"self":[{"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/posts\/5665"}],"collection":[{"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/comments?post=5665"}],"version-history":[{"count":4,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/posts\/5665\/revisions"}],"predecessor-version":[{"id":6124,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/posts\/5665\/revisions\/6124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/media\/5666"}],"wp:attachment":[{"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/media?parent=5665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/categories?post=5665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/littlethemeshop.com\/wp-json\/wp\/v2\/tags?post=5665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}