Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #181114

    Hi,

    I’m new to WordPress themes, however I have read all sorts of posts on this forum about how to add Google Fonts, and I have tried everything, but I just can’t get the font Dosis to appear in the dropdown boxes in the Styling page.
    I was able to get other Google Fonts, such as Roboto. But can’t get Dosis.
    I have also installed the Google Fonts plugin, but that has not helped.

    Dosis is a key element of our branding, and I need to make it work.

    Can anyone help please?

    Thanks.

    #181151

    Hey loyalzoo!

    Please take a look at this topic: https://kriesi.at/support/topic/new-custom-font/

    Cheers!
    Josue

    #181181

    Hi Josue,

    I had already tried what is suggested in that thread. In fact, adding Alef or Roboto works for me perfectly.
    But adding Dosis doesn’t. If I do, the name ‘Dosis’ will appear in the drop down lists in Styling, in quotes, and if selected it will just revert to the default font.
    Not sure why the suggested method works with Alef, Roboto and others, but it doesn’t work with Dosis, albeit being among Google’s fonts for quite a while.
    Can you please help?

    Thanks.

    #181325

    Hey!

    Please add this on functions.php:

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Dosis'] = 'Dosis:400,500,600,700,800';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Dosis'] = 'Dosis:400,500,600,700,800';
    return $fonts;
    }

    What elements or text are you trying to change? You can manually apply the font to them if the above code itself doesn’t work.

    h1, h2, h3, h4, h5, h6 {
    font-family: 'Dosis', sans-serif;
    font-weight: 500;
    }
    

    Cheers!
    Ismael

    #181335

    h1, h2, h3, h4, h5, h6 {
    font-family: ‘Dosis’, sans-serif;
    font-weight: 500;
    }

    Wow! This really worked (in the Quick CSS)!
    Many thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to use Dosis font (Google Font)’ is closed to new replies.