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

    Hi,

    I would like to add the full Roboto font family to the theme. How do I do that?

    There are about 10 different styles of thickness and weight.

    Thanks for your help!

    Gabe

    #682823

    Hi Gabe

    Please add following code to Functions.php file in Appearance > Editor

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

    Regards,
    Yigit

    #683226

    Thanks Yigit.

    Quick question – suppose I wanted to add a font that’s not a Google font. How would I do that?

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