@brandy
To upload a .otf font to Shopify, follow these steps:
- First, log in to your Shopify account.
- In the Shopify dashboard, go to "Online Store" and then click on "Themes".
- In the Themes section, click on "Actions" and select "Edit code".
- In the left-hand sidebar, navigate to the "Assets" folder.
- Click on "Add a new asset" and choose the .otf font file from your computer to upload it to the Assets folder.
- Once the font file is uploaded, you will see it listed in the Assets folder.
- Now, you need to add the font to your theme's stylesheet. In the left-hand sidebar, click on "assets" and then select the file where you want to add the font (usually theme.scss.liquid or theme.css.liquid).
- In the file editor, use the @font-face rule to define the font and specify its source and format. Here is an example of how the code might look:
@font-face {
font-family: 'CustomFont';
src: url('{{'customfont.otf' | asset_url}}') format('opentype');
}
- Save the changes to the stylesheet file.
- Finally, apply the font to your Shopify website by adding the font-family property to the appropriate elements in your theme's stylesheet. For example:
body {
font-family: 'CustomFont', sans-serif;
}
- Save your changes and check your website to see if the font has been successfully uploaded and applied. If not, double-check the file path and font-family name in the stylesheet.
That's it! You have successfully uploaded a .otf font to Shopify and applied it to your website.