The BEST way to import and upload custom fonts into Squarespace 7.1 without Code Block (using .woff and .woff2 files)
Seriously, what is the BEST and most PRACTICAL way to upload and use custom fonts in Squarespace 7.1 - but without using code blocks and creating h6, h7, h8, etc.?
In this blog post, I’m going to show you how to convert .otf or .ttf files INTO website readable files (.woff and .woff2 files) AND import multiple custom fonts into Squarespace 7.1 in a way that is MOST SEO friendly!
And then… I’ll show you how to set your Headings and Paragraph fonts to your new Custom Font!
If you want more CSS snippets, feel free to download my Top 15 Squarespace CSS Cheatsheet:
Step 1: Purchase/Download your Unique Fonts
Where can you find unique fonts? I get all of mine from Creative Market and these are some of my favourite fonts to use:
Step 2: Convert files to Web Format
Let me just quickly categorize font files for you:
Desktop files are either .otf or .ttf
Website files are either .woff or .woff2 (usually both)
eg. If you purchase a website license from Creative Market, you will receive the .woff AND .woff2 files. But if you ONLY purchase the Desktop file, then you only get the .otf or .ttf file.
IMPORTANT: soooo… if your custom font was a paid font (ie. from Creative Market) then by LAW you are obliged to purchase the Website License if you want to use the custom font on your website!
Thus, if you purchased a Website License, then you will have the .woff and .woff2 fonts - so feel free to skip to Step 3!
BUT if you just downloaded a free font from Google Fonts or something and you don’t have the .woff or .woff2 fonts, then here’s a quick shortcut:
Tick the Optimal option
Make sure you have the legal rights to convert the fonts you’re about to upload before you tick the Agreement (generally most free fonts)
Let it run
Hit download zip file!
Step 3: Upload files to Squarespace
Navigate to Design > Custom CSS
Click on Manage Custom Files at the bottom
Click on the Up Arrow that says “add images or fonts”
Find the font files (.woff or .woff2) and upload from your computer
Now click anywhere outside the box to exit.
When you click ‘add images or font’ - it will pull up your computer files. Find your .woff and .woff2 files on your computer and click on it. (eg. I clicked on SometimesTimes.woff and .woff2)
Once I have the font file (SometimesTimes.woff and .woff2) loaded onto my Squarespace platform, I can continue with the below steps.
All you have to do now is copy and paste the code in Step 3, then after url(‘ everything in blue‘), highlight and replace with YOUR custom font by simply clicking on the font file (SometimesTimes.woff and .woff2)
Note: I purchased the rights to the web license for the font Sometimes Times.
Step 4: Insert Custom CSS Code
/* scroll right to see more */ @font-face { font-family: 'sometimes-times'; src: url('https://static1.squarespace.com/static/5e5f40d3ea85966ac5301450/t/5ff793d148b86d2850749c5c/1610060753283/Sometimes+Times.woff2') format('woff2'), url('https://static1.squarespace.com/static/5e5f40d3ea85966ac5301450/t/5ff793df549c6e7b6605f4ca/1610060767450/Sometimes+Times.woff') format('woff'); }
Copy and paste the code above.
Rename the ‘green’ font family with your own. If the font is called Sometimes Times, you can shorten it to ST or anything you want! This will be your ‘code word’, so that every time you use it, Squarespace will know which font you’re referring to.
Make sure there are no spaces or hyphens instead of a space.
Highlight the next green section from https:// to the );}
Delete this and replace it with the font file that you uploaded to your “Manage Custom Files” in Step 2 above.
Make sure you have the single apostrophe ‘ around the link file ’
Great! Now you’ve successfully imported your fonts!
Step 5: Customise your Headings and Paragraphs with CSS
Now let’s use those fonts and override Squarespace’s Heading Fonts by using a little code magic!
Navigate to Design > Custom CSS
Copy and Paste the below code
Swap out the green part (ie. sometimes-times) with YOUR custom font name.
/* Custom Heading Fonts */ h1, h2, h3, h4 { font-family:'sometimes-times' !important; } /* Custom Paragraph Fonts */ p { font-family:'sometimes-times' !important; }
* Trouble-shooting:
make sure you have the single apostrophe around the font name;
make sure you didn’t forget the semicolon ; at the end ;)
make sure there all word spaces have a hyphen — between it.
VOILÀ - this is my Heading ONE in my CUSTOM BRAND font Sometimes Times.
Step 6: BONUS for custom Italic version
So for an Italics version, like my Sometimes Times font, I had to upload a separate font file for that and add some extra CSS code!
Basically repeat steps 3 & 4 for your Italics font file (ie. sometimes-times-italics.woff or .woff2)
Then when you get to step 5, just add: em after H1, H2, H3 and H4 and p
*em signifies italics, so h1 em means when my h1 text is italicized, then use this custom font: sometimes-times-italics.
/* Custom Heading Fonts */ h1 em, h2 em, h3 em, h4 em { font-family:'sometimes-times-italics' !important; } /* Custom Paragraph Fonts */ p em { font-family:'sometimes-times-italics' !important; }
Are you loving these CSS tricks and want more? Grab my top 15 Squarespace CSS snippets (for 7.0 and 7.1). Try them out and watch the magic happen!
Let me know how you went in the comments below or if you still have any questions!