Add a custom font into Editorial theme

taytayvalentine
Tourist
24 0 2

Hi!  I have a Woff2 file of my custom font and I was hoping to get the code to add it into my theme.

 

Gudmudstudios.com

password:gleebglob

 

Thanks!
Taylor

Replies 4 (4)

dmwwebartisan
Shopify Partner
12289 2547 3698

@taytayvalentine 

Uploading your font

To get started, you will first need to upload the font into the Assets folder of your theme.

  1. To get to the Assets folder of your theme, navigate to your Shopify dashboard. From here, go to: Online Store > Actions > Edit Code

  2. Scroll down till you find the Assets folder and click add a new asset, select your font file and hit upload asset.

Installing your font in your theme

Next up: telling your theme that it can use the font file that you have uploaded.

  1. Go to your theme's main CSS file (usually named styles.scss.liquid, theme.scss.liquid, or another variation of this). This file can be found in the Assets folder of your theme - navigate to the bottom of this file to add new code into your theme.

  2. Add the code below, replacing highlighted elements of the code with actual data.
    Font name > the name of the font, if the font has more than one word in it's name it will need "quotation marks" - these will also be needed when inserting into Shogun.
    Filename > the name of the file that was just uploaded to your theme including the file extension, for example, cosmic_sans_bold.ttf.
    Format > the format of the font that was uploaded, for example, for Athena.ttf this would be "TrueType".

@font-face {
font-family: "Font name";
src: url({{ "Filename" | asset_url }}) format("Format");
}


Available font formats: "woff", "woff2", "truetype", "opentype", "embedded-opentype" and "svg".

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
taytayvalentine
Tourist
24 0 2

hi @dmwwebartisan thank you so much for the help!  I did the below and now where do I find the font as an option to use for my site I don't see it in the dropdown lists.

 

Thanks!
Taylor

 

dmwwebartisan
Shopify Partner
12289 2547 3698

@taytayvalentine 

This custom font not show in drop down.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
taytayvalentine
Tourist
24 0 2

right so how do I change a body font for example to use this font?