• Resolved trollo

    (@wb7eu)


    Hello,

    because of the new GDPR and some unclear situations regarding Google Fonts, it is maybe more safe to load fonts locally – which is possible with EF Practical. My only problem currently is, that in functions.php:169 a CSS file gets loaded, which cannot be sourced locally.

    Is there a possibility to deliver this Google Fonts CSS using the same methods as the fonts itself?

    Thanks in advance, and thanks for this great theme!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Dimitrakopoulos

    (@effpandim)

    Hi @wb7eu

    Thank you for using Ef Practical theme.

    You have to create a child theme and in the functions.php paste the following code:

    function efpractical_child_dequeue_google_fonts() {
        wp_dequeue_style( 'practical-fonts' );
    }
    add_action( 'wp_enqueue_scripts', 'efpractical_child_dequeue_google_fonts', 20 );

    Inform me if it works.

    Regards

    Thread Starter trollo

    (@wb7eu)

    Yes, thank you!

    Thread Starter trollo

    (@wb7eu)

    I have to ask again, because I’ve found another occurence of GFonts embedding:

    on my index.php is somewhere at the bottom the following code:

    <script type='text/javascript' src='https://my-domain.com/wp-content/themes/ef-practical/inc/kirki/modules/webfont-loader/vendor-typekit/webfontloader.js?ver=3.0.28'></script>
    <script type='text/javascript'>
    WebFont.load({google:{families:['Playfair Display:400:cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai', 'PT Serif:400:cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai']}});
    </script>

    Because of that, GFonts is loaded using the webfont-loader. The first mentioned solution only removes the direct embedding using css.

    I am using Ef Practical 1.1.1.

    Theme Author Dimitrakopoulos

    (@effpandim)

    Hi @wb7eu

    This appears because of the extension that is used so that the fonts of the theme can be changed.

    Regards

    Thread Starter trollo

    (@wb7eu)

    Is there a possibility to deactivate this WebFont loader? In the EU, we now have to load all fonts locally to prevent warning letters with high penalties.

    Theme Author Dimitrakopoulos

    (@effpandim)

    Hi @wb7eu

    Accept my apologogy for delaying to answer you.

    Go to Customize -> Header -> Header Image Content Typography and then check all “Download font-family to server instead of using the Google CDN”.
    Do the same at Customize -> Typography and in all settings check all “Download font-family to server instead of using the Google CDN”.

    In this way, all the fonts can be loaded locally.
    Inform me that it works.

    Regards

    Thread Starter trollo

    (@wb7eu)

    Accept my apologogy for delaying to answer you.

    No problem, the real life is sometimes more important.

    Go to Customize -> Header -> Header Image Content Typography and then check all “Download font-family to server instead of using the Google CDN”

    Thank you! I’ve missed this option and only found the other one.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Load Google Fonts CSS local’ is closed to new replies.