Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #862601

    Hi, i added the following lines to my functions.php:

    /* Enter your custom functions here */
    
    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Alegreya Sans SC Regular'] = 'Alegreya Sans SC Regular';
    $fonts['Poiret One Regular'] = 'Poiret One Regular';
    
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Karla'] = 'Karla';
    
    return $fonts;
    }

    And did these Settings in the enfold options: https://gyazo.com/7261ed44fa3b3f7f5141a36ea7c4b029
    Problem is, that the font is replaced with a standard font when i view the page. What am i doint wrong?

    Kind regards joschi

    #862901

    Hey j0schi,

    Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #862912

    Sure. this problem seems to appear on multiple of my sites. have a look. You can see the effect on the first 2 headings.
    Kind regards
    Patrick

    #863308

    Hi Patrick,

    h1 looks like the one you set there in the settings.
    h2 has Karla
    and h3 has Poiret One Regular’, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;

    So it looks right to me. Could you please clear the cache, check again and get back to us. Or point us to a page where the styles are not working.

    Best regards,
    Victoria

    #863553

    Hi Victoria, thank you for pointing this out.

    so here is what it looks like (and should look like) when i remove the other fonts.
    https://gyazo.com/b1e856b08e8a53f90eae78561a92af09

    so how do i remove the other fonts ‘Helvetica Neue’, Helvetica, Arial, sans-serif; from the h3?

    Thank you :)

    #864636

    Hi,

    Why do you have to remove the fallback fonts? They are required for systems that don’t support google fonts. It’s not working because the google fonts are not loaded correctly.

    // http://fonts.googleapis.com/css?family=Karla%7CPoiret+One+Regular%7CAlegreya+Sans+SC+Regular

    Please replace the filter in the functions.php file then reselect the font in the General Styling and Advanced Styling panel.

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
      $fonts['Alegreya Sans SC Regular'] = 'Alegreya+Sans+SC:400,700';
      $fonts['Poiret One Regular'] = 'Poiret+One';
      return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
      $fonts['Google fonts']['Karla'] = 'Karla';
      return $fonts;
    }

    Best regards,
    Ismael

    #864852

    Hi Ismael,

    Thank you for pointing this out and the fast support! That is why i use enfold and meanwhile own 14 licences of it haha :) BTW, How many more do i have to buy to get one free? ;)
    I just asked how to remove the “fallback Fonts” because i did not know they are used as a fallback.

    However, the Problem seems to be not solved, i tested different Browsers and still the font on the page looks very different from the one shown on google fonts, as you can see on the following screenshot.
    https://gyazo.com/16e669f185906b66aa48ab34f303f980

    Am I still doing something wrong?

    Kind regards
    Patrick

    #865147

    Hi,

    Please edit the following lines.

      $fonts['Alegreya Sans SC Regular'] = 'Alegreya+Sans+SC:400,700';
      $fonts['Poiret One Regular'] = 'Poiret+One';

    Remove the + symbol.

      $fonts['Alegreya Sans SC Regular'] = 'Alegreya Sans SC:400,700';
      $fonts['Poiret One Regular'] = 'Poiret One';
    

    Re-select the font again afterwards. If it’s not working, add this css code.

    #top #wrap_all .all_colors h3 {
        font-family: 'Poiret One', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-weight: normal;
    }

    I wish I could give you a free license.Thank you for sticking with Enfold. :)

    Best regards,
    Ismael

    #865281

    Hey Ismael, that worked, thank you!
    But basically its the same code i used before i asked a question here haha :D i must have done something funny with it ;)
    Well i think i will own 15 licences before i ask the next question, have to buy one for my next customer. thanks for creating such a great theme!

    #865573

    Hi,

    Great, glad you finally got it working and thanks for using our theme :-)

    Let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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