Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #265817

    In order to have Robot as a font I’ve added the following into the functions .php file after if(isset($avia_config[‘use_child_theme_functions_only’])) return;

    
    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Roboto'] = 'Roboto:400,900italic';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Roboto'] = 'Roboto:400,900italic';
    return $fonts;
    }
    

    However, this was just to test. I now wanted to adjust what font weights are available. I tried amending to ‘Roboto:300400,900italic’; (300 added), butthis doesn’t change anything.

    The front end output is still:

    
    <link rel='stylesheet' id='avia-google-webfont' href='//fonts.googleapis.com/css?family=Roboto:400,900italic' type='text/css' media='all'/>

    I’ve removed the code completely from functions.php, and Roboto continued to be available as a theme font, so I guess that this is now in the database somehow.

    How can I change the weights that are available? Many tanks.

    • This topic was modified 10 years, 7 months ago by ss.
    #266014

    Hey!

    You are missing a comma:
    http://fonts.googleapis.com/css?family=Roboto:300,400,900italic

    Cheers!
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.