How to add custom fonts in Sleek? 🔥
A guide to add custom fonts to your store
Last updated
A guide to add custom fonts to your store
Last updated
Sleek provides a wide library of system fonts to meet most design needs, but you can add custom fonts to personalize your theme further. Here’s how! ✨
Ensure the font format is one of the following: .ttf
, .otf
, .woff
, or .woff2
.
Legal use: Ensure you have proper licenses for your custom fonts by working directly with font authors or distributors to ensure legal compliance.
Steps:
Go to Shopify Admin > Files > Upload Files.
Select and upload your font file.
To manage your customizations, you’ll need a dedicated CSS file. This makes updates easier and keeps everything organized.
Steps:
1. In your Shopify admin, go Online Store > Edit code.
2. Navigate the Assets folder, click Add a new asset.
3. In the pop-up, click Create a blank file.
4. Select the Extension and name the file custom
.
Click Done.
6. After the new asset is created, go to the Layout folder and open the theme.liquid
file.
7. Locate this line:
Copy the line, paste it below, and update the file name to custom.css
:
9. Click Save.
You’ll now define your custom font using @font-face
in the new custom.css
file.
Steps:
Go to Themes > Edit Code, and open assets/custom.css
Add the following code:
For example:
Optional font styles:
Bold:
Italic:
Customize specific areas of your theme by updating CSS variables. Add these codes to your custom.css
file.
For example:
For example:
For example:
For example:
For example:
For example:
Then, click Save and check the result.
Font performance: Using too many fonts can slow down your site. Stick to 1-2 custom fonts for better performance.
Browser compatibility: Use formats like .woff2
for modern browsers and .woff
for older ones.
Test across devices: Ensure your fonts display correctly on different devices and browsers.
🎉 Congratulations! Your custom font is now ready to elevate your designs in Sleek. 🚀
Once uploaded, click the button and copy the font's URL.