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

    Hi there,

    I am using Adobe Typekit to implement a site wide font. This has been implemented using the “Typekit Fonts for WordPress” plugin. The problem that I have is that the header of the site features a prominent Call to Action (colour section with YouTube video background”.

    The site loads relatively quickly, although the default fonts are loading first, followed by the Typekit fonts. Is there a way stop the default fonts from loading, or prioritise the Typekit font?

    I have temporarily disabled the YouTube video in the header, however this does not reduce the load time.

    The site is using the WP Super Cache plugin, however this does not appear to me a significant difference.

    I assume that there is a method of prioritising the Typekit embed code, and thereby loading the font before other resources are loaded?

    Thanks for your help

    • This topic was modified 8 years, 4 months ago by csmwebdesign.
    #667826

    I’ve spent quite a long time attempting to troubleshoot this, rather unsuccessfully.

    I’ve removed the YouTube video’s, section background, and also on the call to action, I’ve removed the Typekit font.

    I’ve created a video to show what is happening, link is the in private content. Thanks.

    #667833

    Further followup, removing the Typekit font from my child styles.css resolves the issue, therefore the slight FOUC / stutter on font change presumably can be prevented by only displaying my Typekit font? The trouble appears to be at the moment that Enfold is attempting to load a default font, and then switch to my Typekit font. In actual fact, I only want the Typekit font to be used throughout the entire site.

    I’ve added the font to the theme and set it as the default font for body and headings, as per this post, unfortunately the FOUC / stutter is quite obvious: https://kriesi.at/support/topic/new-custom-font/

    My code is:

    add_action( ‘init’, ‘enfold_customization_swtich_fonts’ );
    function enfold_customization_swtich_fonts() {
    global $avia;
    $avia->style->print_extra_output = false;
    }

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘kepler-std-display’] = ‘kepler-std-display’;
    return $fonts;
    }
    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘kepler-std-display’] = ‘kepler-std-display’;
    return $fonts;
    }
    Thanks in advance

    • This reply was modified 8 years, 4 months ago by csmwebdesign.
    #669555

    Hi,

    Please post an access to the site too, i’ve added it to hosts but it’s displaying a maintenance page.

    Best regards,
    Josue

    #669744

    Hi Josue, the site isn’t live yet so there is no other way of accessing. If you are viewing a maintenance page, the entry in the hosts file is not being referenced correctly. Hosts file entry added to private content.
    Thanks

    #669935

    I have it exactly like that in hosts, anyhow have you tried using an async code instead of the wp plugin?
    New embed code for asynchronous font loading

    Best regards,
    Josue

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