Okay
  Print

How to add a new font

The theme includes a collection of Google Fonts, which you can find in Appearance -> Fonts and colors -> Fonts.

 

 

However the list of available fonts can be expanded by adding new ones.

 Adding a New Google Font

 If you want to add a new font from the Google Fonts library, open the core.lists.php file in the  wp-content/themes/theme_name/fw/core/ directory.

 Find the themename_get_list_fonts() function, and locate the list of available fonts.

 

 

You'll see an array of Google fonts. Duplicate one of the font entries and replace the name of the font with your own. The line would look like this:

 'Cabin Condensed' => array('family'=>'sans-serif'),

 If in doubt which name to pick, consult with the Google Fonts repository.

 After saving the file, go to the admin panel, and navigate to Appearance -> Fonts & Colors -> Fonts. Now your new font is available for all typography elements.

 Adding a Custom Font

 1. In the css/font-face/ directory, create a new folder and give it a name of your font.

 2. The folder has to contain a @font-face kit, which would load your custom font on a webpage.

 The easiest way to create it is by using a webfont kit generator, such as Font Squirrel Generator (visit our tutorial to see how to use it).

 3. Extract the generated archive into /css/font-face/your-font-name.

 Important! Make sure that the name of your folder corresponds with the font-family value in the stylesheet.css.

4. Optional! You may also need to  to register your font name in functions.php.

Open up functions.php and find a line with 'required_custom_fonts'. Add the name of your font preceded by comma.

 

 Now if you go to the Appearance -> Fonts & Colors -> Fonts, you'll see your new typeface available among the other fonts.