Dear Shopify Community,
how do I add a custom font to my Shopify theme? We use Empire.
Thanks!
Dear Shopify Community,
how do I add a custom font to my Shopify theme? We use Empire.
Thanks!
@Kobold Hello
Can you please Follow this Process
Choose and Obtain Your Custom Font:
Upload the Font Files:
Go to your Shopify Admin dashboard.
From the left-hand sidebar, click on “Online Store.”
Select “Themes.”
Find and click on the “Actions” dropdown for your Empire theme and select “Edit code.”
In the “Assets” folder, click on “Add a new asset.”
Upload your font files (usually .woff or .woff2) to the Assets folder. Make sure to note the file names and extensions.
Edit Your Theme’s Stylesheets:
In the “Edit code” section, locate and open the “theme.scss.liquid” or “theme.css” file. If you have multiple CSS files, look for the main stylesheet.
In your stylesheet, you will need to define a @font-face rule to declare the custom font. Here’s an example
@font-face {
font-family: 'CustomFontName';
src: url('{{ 'your-font-file.woff' | asset_url }}') format('woff');
/* Add more src declarations for different font formats if available */
font-weight: normal;
font-style: normal;
}
Apply the Custom Font to Your Styles:
body {
font-family: 'CustomFontName', sans-serif;
}
Save Changes:
Check Your Store:
Publish the Changes:
If everything looks good, click the “Online Store” tab in your Shopify Admin, then select “Themes.”
Click the “Actions” dropdown for your Empire theme and choose “Publish.”
Confirm the publication and your custom font should now be live on your Shopify store.