Add custom font to font library

ahoj-brause
Tourist
5 0 4

How can i add a custom font, loaded via typography.com CDN in head of theme.liquid, to Shopify's font library so that i can pick this font via font-picker in my theme?

As i understand this article, i have to add the custom font to the font library first:

https://shopify.dev/tutorials/develop-theme-fonts

Not sure how this works, and i don't understand this part "Personal access to the font files isn't currently available."

Does this mean i can not add any additional custom fonts to the font library so that font-picker can use it?

https://shopify.dev/docs/themes/settings#font-picker

PS: i don't want to download the file and i don't want to use !important statements to overwrite CSS, i just want to pick the custom font like all already existing fonts via the font-picker

Replies 9 (9)

Ninthony
Shopify Partner
2330 350 1024

As far as I know, you can't do this, though I would welcome the information. Your best option is going to be loading the file from the CDN in the head of your theme, and then applying the font-family to the places you want through CSS. This is the only way I know of adding custom fonts to Shopify.

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
ahoj-brause
Tourist
5 0 4

Hey @Ninthony and @KetanKumar,

thanks for the information. I was aware of this approach but this is not what i'm looking for.

I would like to use custom fonts with the font-picker without 'hacking' it into the CSS file.

KetanKumar
Shopify Partner
36845 3636 11978

@ahoj-brause 

Shopify allows this for font picker 

https://shopify.dev/tutorials/develop-theme-fonts#browse-available-fonts

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
ahoj-brause
Tourist
5 0 4

Hey @KetanKumar,

thanks for the link. I'm aware of this article but can not find any information about where to actually put those custom fonts and how to add those fonts to the Shopify's font library so that font-picker can actually use them.

pioneer100
Shopify Partner
1119 145 481

@ahoj-brause  ,
- Shopify does not provide the facility to add custom fonts and use them from Font-selector option.
- You need to add font in asset manually as @KetanKumar  has mentioned in above post.

If helpful, Please Like and accept The Solution.
ahoj-brause
Tourist
5 0 4

Thanks @pioneer100.

Included custom fonts as mentioned before. I was hoping to bypass this path because now the template editor UI has no more control over the fonts because i'm forcing custom fonts via CSS.

Shopify i think adding custom fonts to the font library to use them "as usual" would be a useful feature for your product.

KetanKumar
Shopify Partner
36845 3636 11978

@ahoj-brause 

Welcome to the Shopify community!
and Thanks for your Good question.

Shopify font library not allow to custom add 

but you can do int custom font on your store 

1. Go to Online Store->Theme->Edit code
2.Asset->/theme.scss.liquid->upload your custom font all font tyep = TTF, OTF, WOFF, WOFF2, SVG
3. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

@font-face {
font-family: 'Montserrat-Regular';
src: url('{{ 'Montserrat-Regular.eot?' | asset_url }}');
src: url('{{ 'Montserrat-Regular.eot??#iefix' | asset_url }}') format('embedded-opentype'),
url('{{ 'Montserrat-Regular.woff' | asset_url }}') format('woff'),
url('{{ 'Montserrat-Regular.ttf' | asset_url }}') format('truetype'),
url('{{ 'Montserrat-Regular.svg#Montserrat-Regular' | asset_url }}') format('svg');
font-weight: normal;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: antialiased;
}

can you please just change font name, for example, Montserrat-Regular to your custom font name

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KetanKumar
Shopify Partner
36845 3636 11978

@ursula16 

what's issue

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

MRamzan
Shopify Partner
126 1 20

You can try this solution. I have solved it and the font shows in the settings.

 

Hire Me:

WhatsApp: +91-9145985880
Email: mohdramzaan112@gmail.com
Skype: mohdramzaan112