Anyone have experience with adding custom fonts to Venue?
I am having issues with my fonts not displaying correctly and I’m wondering if I didn’t install them correctly?
Thanks!
Anyone have experience with adding custom fonts to Venue?
I am having issues with my fonts not displaying correctly and I’m wondering if I didn’t install them correctly?
Thanks!
Hello @solicatch ,
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.
Go to your theme’s main CSS file (usually named styles.scss.liquid, theme.scss.liquid, or another variation of this). This file can be found in the Assets folder of your theme - navigate to the bottom of this file to add new code to your theme.
Add the code below, replacing highlighted elements of the code with actual data.
Font name > the name of the font, if the font has more than one word in its name it will need “quotation marks” - these will also be needed when inserting into Shogun.
Filename > the name of the file that was just uploaded to your theme including the file extension, for example, cosmic_sans_bold.ttf.
Format > the format of the font that was uploaded, for example, for Athena.ttf this would be “TrueType”.
After the upload font success, you can use it at the theme-critical.css
example:
name file upload: text.wofff2
using:
@font-face {
font-family: "text";
src: url({{ "text.woff2" | asset_url }}) format("woff2");
}
body{
font-family:text
}
Hope my solution works perfectly for you!
Best regards,
Victor | PageFly