Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #662605

    I’m looking at the sample code in http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/

    and struggling to see where in, for example, https://fonts.google.com/specimen/Reem+Kufi I can find the list of font weights I need to add in:

    $fonts[‘PT Sans’] = ‘PT Sans:400,700,400italic,700italic‘;

    Ian

    #663472

    Hey Ian,

    Thanks for getting in touch with us!

    That’s because the Google font you are trying to add only has one font weight.

    Best regards,
    Jordan

    #663513

    Hi Jordan

    Aye, I understand that. But the line

    $fonts[‘Reem+Kufi’] = ‘Reem+Kufi’;

    doesn’t produce any additional entries and I can’t find any documentation on the format required, nor where to pick up that information in the fonts pages.

    #663520

    Hi!

    Please use the code as following

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

    If that still does not work, please create a temporary admin login and post it here privately so we can look into it.

    Best regards,
    Yigit

    #663544

    $fonts[‘Reem Kufi’] = ‘Reem Kufi:400’;

    works.

    Looks like I

    1. go to the customize page to pick up the numeric weight to use, and
    2. Drop the “+” sign.

    Is that the general rule?

    Many thanks.

    Ian

    #663545

    Hey!

    Yes, but as Jordan mentioned, there is only one font weight for the chosen font family :)
    Let us know if you have any other questions or issues.

    Regards,
    Yigit

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