What about Font - Font Manager - Global Typography options - etc

Hi Support

I’d like to make a summary of the situation FONT.

I’d like to start with a simple example:

The Default for X is:

  • Lato (Google) 400 - Regular for BODY AND CONTENT
  • Lato (Google) 700 - Bold for HEADINGS

If I’d like to use other Fonts for different CUSTOM USE:

  • Lato (Google) 300 - Light
  • Lato (Google) 900 - Black

What is the best solution to achieve this?

  1. Add to Child style.css the following line:
    @import url('https://fonts.googleapis.com/css?family=Lato:300,300i,900,900i&subset=latin-ext');
    than use “w-300” or “w-900” classes inside Cornerstone

  2. Add a New Template to Font Manager (but I know there are some bugs with this solution):
    than…?

  3. Other solutions?

Thank You

Hi there,

You may add this code in the functions.php of the child theme:

/**
 * Enqueue scripts and styles.
 */

add_action( 'wp_enqueue_scripts', 'add_scripts' ); 
 
function add_scripts() {	

	wp_enqueue_style( 'custom-google-font', 'https://fonts.googleapis.com/css?family=Lato:300,300i,900,900i&subset=latin-ext' );
}

Then you can create the custom CSS for the new font weights and add the class to the elements.

Hope this helps.

Dear Jade

Any more elegant solution from Theme functions?

Thank You

Hi There,

Actually, the 2 solutions you mentioned above are the most elegant solution. If by “CUSTOM USE” you mean a specific V2 element on the builder, then utilize the Font Manager (Template > Fonts), add a new font to your font template collection with all the weight you need for it and then use that font on your V2 element’s Font Family option. This is how should be the workflow if you’re utilizing V2 elements, define all the fonts and colors that you need on the templates manager first, and use that throughout the site.

Update your theme to the latest version as we have addressed a handful of bugs from the previous version.

If by “CUSTOM USE” you mean hardcoded markup, then use the #1 solution you mentioned above.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.