Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23129

    Hi,

    how can I assign all available weights of the Open Sans font to h1, h2 etc.? In particular, I need the bold variant, ie. 800. It seems like the theme only loads the 300 and 600 weights.

    Thanks!

    Andy

    #118629

    You can use the avf_google_heading_font and avf_google_content_font filter to add a new font weight. Insert following code at the bottom of functions.php:

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Open Sans'] = 'Open Sans:400,600,800';
    return $fonts;
    }

    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Open Sans'] = 'Open Sans:400,600,800';
    return $fonts;
    }

    #118630

    Great, thanks so much! :)

    Will try it out.

    #118631

    Hey,

    Glad it is fixed. :)

    Regards,

    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Need to use all weights of the "Open Sans" font (e.g. bold/800)’ is closed to new replies.