Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1305074

    Hi guys,

    after the new update, google tells me “Make sure the text remains visible while loading web fonts”.
    I had already fixed this problem 5 months ago, but it suddenly comes back after the update.

    It’s a sin, before google had 93 points for the desktop.

    Below is the quick CSS inside the Enfold settings, general style:

    /*hide auto sidebar from magazine*/
    .page-id-2967 .sidebar .widget_nav_hide_child {
    display: none;
    }

    /*2.8 firefox problem*/
    .avia-image-container-inner, .avia_image {
    max-width: 100%;
    }

    #socket .avia-bullet, #socket .avia-menu-fx {
    display: none;
    }

    @font-face {
    font-family: “Open sans”;
    font-display: swap;
    }

    @font-face {
    font-family: ‘entypo-fontello’;
    font-display: swap;
    }

    @media only screen and (max-width: 767px) {
    .main_color .flex_column {
    padding: 0 !important;
    }
    }

    How can I change these settings to return to the pre-update results?
    Thank you.

    #1305529

    Hey zibbaldone,

    Thank you for the inquiry.

    It seems to be referring to the entypo-fontello font. To fix that, try to add the filter that we provided in the following thread.

    // https://kriesi.at/support/topic/how-to-implement-relpreload-preload-key-requests-for-font-entypo-fontello/#post-1290768
    // https://kriesi.at/support/topic/improving-laoding-of-font-entypo-fontello/#post-1283666

    Make sure to replace “block” with “swap”.

    Best regards,
    Ismael

    #1306187

    Hi Ismael, thank you for reply.

    So.. if I understand, I need to add this :

    function avf_custom_font_display( $font_display, $font_name )
    {
    // Check for a font and change the default theme setting
    if( ‘entypo-fontello’ == $font_name )
    {
    return ‘block’;
    }

    return $font_display;
    }

    add_filter( ‘avf_font_display’, ‘avf_custom_font_display’, 10, 2 );

    I have questions about it:

    – So…I need to add this in the section: Theme — general style … quick css?

    – Before inserting the new code, do I have to remove the following code currently present?
    @ font-face {
    font-family: “Open sans”;
    font-display: swap;
    }

    @ font-face {
    font-family: ‘entypo-fontello’;
    font-display: swap;
    }

    -Should I copy the new code you suggested to me exactly as you provided it or do I need to put the default theme font in font_name(or other customizations in line with the current ones on the theme)?
    Example:
    // Check for a font and change the default theme setting
    if (‘entypo-fontello’ == $ Open Sans)

    Please try to tell me exactly what I need to do, if there are other parts to change and where to insert the new code.

    Excuse all these questions, I want to make sure I understand and make the change well.
    Thanks for your patience.

    #1306589

    Hi,

    Thank you for the update.

    You have to add the code in the functions.php file, and replace “block” with “swap”. Look for this line..

    return "block";
    

    .. and replace it with:

    return "swap";
    

    You do not have to change the name of the font. If it is not working, try to use “block” again.

    Best regards,
    Ismael

    #1306759

    Hi Ismael,
    thank you for reply.

    I don’t have in my function.php this line. I attach private link to show my file.

    The strange thing is that before the theme update, there wasn’t this problem.

    Thank you.

    #1307079

    Hi,

    Did you add the code or filter in the functions.php file? You have to add the code manually and change the line that we mentioned above.

    Best regards,
    Ismael

    #1307169

    Thank U Ismael

    #1307368

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1307595

    Hi,
    I put the code in the php file, the score hasn’t changed and now it marks me entypo fontello in another section, from “Make sure the text remains visible while loading web fonts” to “Avoid huge network payloads”.

    Thanks anyway for the help, I appreciated it.

    #1307832

    Hi,

    Thanks for the update. Do you need any further help with this?

    Best regards,
    Rikard

    #1307937

    No, thank you.

    #1308235

    Hi,

    Thanks for letting us know. I’ll go ahead and close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Fontello after new update’ is closed to new replies.