Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Multiple fonts in one line/heading

Solved

Multiple fonts in one line/heading

annukka
Shopify Partner
4 0 0

Hey! I'd like to use two different fonts in one heading, like they have done in this Gem theme. Could someone help me out? 😊 I have already uploaded my custom fonts to Shopify. Thanks!

 

Screenshot 2024-06-24 at 20.30.28.png

Accepted Solution (1)
Shadab_dev
Shopify Partner
892 49 88

This is an accepted solution.

@annukka Sure i will explain you what i did. I see that you had the goodsans font already in there. So its just flecha.

Shadab_dev_0-1719362137366.png

in the header of the image banner section. make the part which you want flecha or any different font italic with the help of richText editor. Then inside the code editor open section-image-banner.css file under assets folder.

Shadab_dev_1-1719362413559.png

Look for banner__heading with ctrl+f find this code 

 

.banner__heading {
margin-bottom: 0;
} dont change any of this just under this code add

h2.banner__heading em{
font-family: Flecha L !important;

text-style: normal // add this line if you dont need italic style
}

And most importantly the fonts you add to your assets folder dont forget to add it to your theme.liquid file like this under base.css

Shadab_dev_2-1719362781131.png

Make sure the name of the file is exactly same as the file in the assets folder.

I just hope i was able to explain this. Let me know if you have any queries.

thanks

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.

View solution in original post

Replies 8 (8)

Shadab_dev
Shopify Partner
892 49 88

@annukka Can you provide the store link and the fonts you are using. If they are not google fonts please also send the links for them. Also share the theme and the version you are using. Thanks.

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
Shadab_dev
Shopify Partner
892 49 88

@annukka thank you for the details. I am on it. The stuff is easy it's just using the correct font name and i am trying to get hold of that.

 

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
Shadab_dev
Shopify Partner
892 49 88

@annukka I tried man. Doing it just right as other fonts are taking effect. But this flecha font is not taking effect. The closest font that matches it is the Times New Roman font. Here is the screenshot.

Shadab_dev_0-1719315922358.png

 

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
annukka
Shopify Partner
4 0 0

Thank you so much for your effort! Could you please share the code you used, if I decide to use a different font? 🙏

Shadab_dev
Shopify Partner
892 49 88

This is an accepted solution.

@annukka Sure i will explain you what i did. I see that you had the goodsans font already in there. So its just flecha.

Shadab_dev_0-1719362137366.png

in the header of the image banner section. make the part which you want flecha or any different font italic with the help of richText editor. Then inside the code editor open section-image-banner.css file under assets folder.

Shadab_dev_1-1719362413559.png

Look for banner__heading with ctrl+f find this code 

 

.banner__heading {
margin-bottom: 0;
} dont change any of this just under this code add

h2.banner__heading em{
font-family: Flecha L !important;

text-style: normal // add this line if you dont need italic style
}

And most importantly the fonts you add to your assets folder dont forget to add it to your theme.liquid file like this under base.css

Shadab_dev_2-1719362781131.png

Make sure the name of the file is exactly same as the file in the assets folder.

I just hope i was able to explain this. Let me know if you have any queries.

thanks

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
annukka
Shopify Partner
4 0 0

Thank you so much for your help! I got the Flecha font to work by changing the spacing "Flecha L" > "FlechaL" 🙌

Shadab_dev
Shopify Partner
892 49 88

@annukka great, well all is well that ends well. Feels great that it worked out for you.

 

Thanks

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.