All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi There! @Shopify
I am using the Pipeline theme for the Shopify store. I want to add my fonts to this theme. I have two different fonts with different font weights. I know I have to update the `css-variabel.liquid`. Can anyone please help to add my custom fonts to this?
Thanks
Hi Nira,
You can follow Shopify's instruction to add custom fonts to your theme:
https://shopify.dev/docs/themes/architecture/settings/fonts#custom-fonts
Hi @Van_Nguyen_GSG,
I have the default theme's `css-variable` file, in this, they have set fonts variable like below. How can I use custom fonts in this to work? I tried but it's not working properly. If you know something please let me know. Thanks
assign base_font = settings.type_base_font assign base_font_bold = base_font | font_modify: 'weight', 'bolder' assign heading_font = settings.type_heading_font assign heading_font_bold = heading_font | font_modify: 'weight', 'bolder' assign accent_font = settings.type_accent_font assign accent_font_bold = accent_font | font_modify: 'weight', 'bolder'
Hi @Niralishopwell,
You can follow my steps below to upload your custom font.
Uploading your font
To get started, you will first need to upload the font into the Assets folder of your theme.
Installing your font in your theme
Next up: Tell your theme that it can use the font file that you have uploaded.
Hope my solution works perfectly for you!
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Hi @PageFly-Richard, thanks for replying. I have already done by this way but I follow this process I have to check and change fonts to every class element.
Can I update `css-variables` like this
assign base_font = settings.type_base_font assign base_font_bold = base_font | font_modify: 'weight', 'bolder' assign heading_font = settings.type_heading_font assign heading_font_bold = heading_font | font_modify: 'weight', 'bolder' assign accent_font = settings.type_accent_font assign accent_font_bold = accent_font | font_modify: 'weight', 'bolder' assign nav_font = settings.type_nav_font
PLease help me if you know the solution. Thanks
Yes you can use it by structure
{% liquid
assign base_font = settings.type_base_font
assign base_font_bold = base_font | font_modify: 'weight', 'bolder'
assign. heading_font = settings.type_heading_font
assign. heading_font_bold = heading_font | font_modify: 'weight', 'bolder'
assign accent_font = settings.type_accent_font
assign accent_font_bold = accent_font | font_modify: 'weight', 'bolder'
assign nav_font = settings.type_nav_font
%}
<style>
.class{
//example
font-weight:{{heading_font_bold }}
}
</style>
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Hello,
Please follow the step and solve the issue
Step 1) From your Shopify admin, navigate to Settings > Files.
Step 2) Click on upload files at the top right and upload all of your font files.
Step 3) After that click the font and copy the font url.
@font-face {
font-family: 'Font-Name';
src: url('Font-url.woff2') format('woff2');
font-weight: bold;
}
body {
font-family: 'MyWebFont;
}
Step 4) Add the CSS in base.css and save the file
Thanks.
Hi @niraliie ,
Request you to refer the below video how you can add TIFF and OTG fonts to Shopify font settings.