Add a New Font (Third Party)

Adding a new font to the ion platform is similar to adding fonts to most other platforms. We strongly recommend having experience with CSS before attempting. We also recommend reviewing the developer's guide prior to working within an ion Framework. 

This method assumes that you don't have font files and are instead using a third party to host the fonts for you. Each third party should provide details for installing the font, but most will use a link reference or the @import rule. For a third party font using the link method, you should have a line of code that looks something like this Google Fonts example:

<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

The @import rule method should look something like this:

@import url(//fonts.googleapis.com/css?family=Open+Sans);

If you're not using a hosted font and instead have font files ready to upload, follow the steps outlined in the support post here.

Link Method

First, click the Libraries tab and then select Frameworks to get to the Frameworks Library.

1-Jan-08-2021-03-32-07-18-PM

 

Click the "ion Framework 4" link (or the Framework you'd like to apply the font within)

2-Jan-08-2021-03-32-24-97-PM

 

Click Themes to show all of the themes that exist in the Framework, the expand the Theme you wish to add the font to.

3-Jan-08-2021-03-32-34-94-PM

In the list of Theme files, open the file titled "webfonts.txt". In this text file, you can paste in the link reference. Below is an example of links for both Google Fonts and FontAwesome.

4-3 

You can now "Save and Close" the webfonts.txt file. To declare the font you've linked, click into the "theme.css" file to access the main style sheet. This is where you will declare the font. To use your new font, just add the font family CSS to the elements where you'd like that font family to be used.
 

element {
font-family: 'MyWebFont', Fallback, sans-serif;
}

 

@import Rule Method

First, click the Libraries tab and then select Frameworks to get to the Frameworks Library.

6-1

Click the "ion Framework 4" link (or the Framework you'd like to apply the font within).

7-1

Click Themes to show all of the themes that exist in the Framework, the expand the Theme you wish to add the font to.

8

In the list of Theme files, open the file titled "theme.css". This is where you will declare the font.
 

Paste the @import rule to reference your font files, and be sure to place it above any CSS that may reference the fonts. Below is an example of an @import declaration.

9-1

Notice in the screenshot above, the Open Sans font imported using the @import rule being referenced in the html CSS class. Just like the screenshot above, you will want to add the font family CSS to the elements where you'd like that font family to be used as well.
 

element {
font-family: 'MyWebFont', Fallback, sans-serif;
}

 

To add your fonts as Micro-Theme options, check out the Micro-Theme Developer's Guide here.