Home Forums Community Forum GDPR Avada 5.5.2 – google fonts store locally.

Only users with a registered purchase of Avada can post to the community forum. Please register your purchase here.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • pkershaw
    Participant
    Post count: 2

    Hi all

    The latest Avada release allows you to save google fonts locally to comply with GDPR

    I can’t seem to find this in Avada > Theme Options > Typography …. or in … Appearance > Customise > Typography.

    Does anyone know how to store the Google fonts locally?

    Thanks for any help. 🙂

    revans0636
    Participant
    Post count: 60

    It’s in WP>Avada>Theme Options>Advanced>Privacy and then on the page look at the Google Fonts Mode. Change the toggle to Local, and then save the page. Haven’t found the Avada document page for the new privacy features yet…

    pkershaw
    Participant
    Post count: 2

    Hi Revans0636

    Thanks so much – I hadn’t found that. That worked.

    timavo
    Participant
    Post count: 4

    Hi,

    I set the Google fonts mode to ‘local’ but the fonts are still loaded from the Google CDN.


    https://pasteboard.co/HnHGh5X.png


    https://pasteboard.co/HnHGIhV.png

    Any ideas?

    Michael C
    Keymaster
    Post count: 437

    Hi timavo, please check your plugins. Almost certainly the other Google fonts will be coming from a plugin rather than the theme (for example Layer Slider/Slider Revolution).

    timavo
    Participant
    Post count: 4

    Hi Michael C,

    I created a blank page (with only the header and footer) and deactivated ALL plugins (except the Fusion Builder). The Roboto font is still loaded from the Google CDN.

    Cheers
    Tim

    Michael C
    Keymaster
    Post count: 437

    In that case please post a link to your website. Without at least that it is impossible to say. However based on the screenshots that is not Avada due to the fact the fonts are not loaded like that in the theme even if Google Fonts CDN is selected.

    Michael C
    Keymaster
    Post count: 437

    Also note, when checking, please check in an incognito window. If you are checking from a browser where you are signed into the back-end then you may have fonts loaded from CDN when going from back-end to front-end.

    timavo
    Participant
    Post count: 4

    Link: http://www.za-hinkelmann.de/leer

    Password: AvadaHelp

    Active Plugins

    • Fusion Builder
    • Fusion Core
    • Password Protected
    Michael C
    Keymaster
    Post count: 437

    Hi @timavo, that will be coming from the Google Maps in the footer. Google Map embeds load Roboto as standard. If you remove the map or enable the privacy mode in Theme Options > Advanced > Privacy (and do not give it permission) then you should see the references go.

    timavo
    Participant
    Post count: 4

    Michael C, thank you very much for your help!

    I found a solution on Stack Overflow to prevent Google Maps from loading the Roboto font.

    Create a /js/norobotofontbymaps.js in your child theme folder. Put this code into norobotofontbymaps.js:

    var head = document.getElementsByTagName('head')[0];
    
    // Save the original method
    var insertBefore = head.insertBefore;
    
    // Replace it!
    head.insertBefore = function (newElement, referenceElement) {
    
        if (newElement.href && newElement.href.indexOf('//fonts.googleapis.com/css?family=Roboto') > -1) {
    
            console.info('Prevented Roboto from loading!');
            return;
        }
    
        insertBefore.call(head, newElement, referenceElement);
    };

    Add this code to your functions.php:

    /*prevent roboto fonts loaded by google maps api*/
    $child_theme_url = get_stylesheet_directory_uri();
    wp_register_script( 'norobotofontbymaps', $child_theme_url.'/js/norobotofontbymaps.js', 'jquery', "1", true);
    wp_enqueue_script( 'norobotofontbymaps' );
Viewing 11 posts - 1 through 11 (of 11 total)
Only users with a registered purchase of Avada can post to the community forum. Please register your purchase here.