Lab - Add a Custom Font Bundled with the Theme
Lab - Add a Custom Font Bundled with the Theme
Lab - Add a Custom Font Bundled with the Theme
In this lab, you will:
Prerequisites
There are two paths to take for using custom fonts:
Google Fonts is a collection of open source fonts available for use. The base Cornerstone theme uses Karla and Montserrat. Google Fonts come included in the Cornerstone theme. In config.json update each place you want the change with the name of the new Google Font.
Make sure it follows of the format Google_FontName_Weight.
If you are using a different theme, verify using Google Fonts.

<head> block, add a style block with @font-face rules for each version of the font in the new directoryTo make sure the new font is available in the fonts list when editing in Page Builder, add it in schema.json.
"headings-font": "Gotham_700"Note that your new default value in config.json should match the “value” of one of the available font settings you added in schema.json.
Custom fonts can be used in any theme. To use a custom font, upload it to the stores /content/ folder in WebDav.

For more information on custom fonts, go to: Custom Fonts and Icons.

You cannot create new top-level directories in WebDAV, but you can create new subdirectories. If you receive a permissions error trying to create a subdirectory, try dragging a folder created on your desktop into the target directory in WebDAV
Referencing from the CDN
Any time a file is uploaded to the /content/ directory, it is best to reference it from the CDN. The steps in this lab reference the font from the store’s domain, but you can use the URL structure below to access the /content/ directory on the CDN:
https://cdn11.bigcommerce.com/s-<STORE_HASH>/content/
"body-font": "Google_Karla_400""body-font": "Indigo Regular""headings-font": "Google_Montserrat_400""Google_Font+Name_FontWeight" "headings-font": "Google_Lobster+Two_700"When you create @font-face rules be sure to choose a font weight that is available on Google. If you choose a weight that is not available on Google, it won’t exist and it will default to the browser default font.
Google font support is included in the base Cornerstone theme. Other marketplace themes may not come with this built-in.