• A friendly hello to all,
    I always code my themes myself and also use self-hosted fonts. However, sometimes plugins still load google fonts via the google server. Does anyone know of a way to prevent these fonts from loading?

    I’ve tried several plugins, but the fonts still load from the Google server. So I would prefer a solution via the functions.php.

    Thanks for ideas!
    Raphael Bolius

    • This topic was modified 2 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 6 replies - 1 through 6 (of 6 total)
  • In my experience, there is no ultimate way that prevents all possible types of embedding. There are plugins that supposedly can do that, like: https://www.ads-software.com/plugins/disable-remove-google-fonts/ – but even that doesn’t work in every case.

    So you should first see if the causing plugin or theme itself offers an option. With Elementor or RevSlider this is possible, as well as with many others. Usually the option consists of “disable Google Fonts” or “embed locally”.

    In these cases, I check the developer tools of my browser to see what is loaded, then check the source code to see what source it comes from, and then change the setting in the source. Often you can find help on the Internet for the relevant places, because others have already stumbled over it. Or you ask the plugin or theme developer about it (I had to do so rarely).

    Thread Starter rabox66

    (@rabox66)

    Hi threadi,
    thanks for the posting. But as I already mentioned the plugins do not work. As the loading of google fonts from the google server is not allowed in Europe (GDPR) there should be a way to stop the loading globally I guess.

    WP accepts all rules of the GDPR very well, so I cannot imagine that this detail is not fixed.

    Does anybody know more?
    Thanks
    Raphael

    It is not the task of WordPress to take care of matters of plugins and themes. The EU (not just Europe) is only a very small part of the world in which WordPress is used. If technical limits were set for any region of the world, WordPress would no longer be usable. Therefore, it is up to the plugin and theme developers. WordPress just a few weeks ago called on the developers responsible for themes to pay better attention to the integration of external fonts: https://make.www.ads-software.com/themes/2022/06/18/complying-with-gdpr-when-using-google-fonts/

    Thread Starter rabox66

    (@rabox66)

    Here I localized the code that loads the font “Rubic” from google servers. But I do not have any glue to which plugin it belongs. how can i find out, which plugin is causing it? WordPress Download Manager would be an option. but i do not use this plugin.

    <meta name="generator" content="WordPress Download Manager 3.2.49" /><link href="https://fonts.googleapis.com/css?family=Rubik"
    rel="stylesheet"><style>.w3eden .fetfont,.w3eden .btn,.w3eden .btn.wpdm-front h3.title,.w3eden .wpdm-social-lock-box .IN-widget a span:last-child,.w3eden #xfilelist .panel-heading,.w3eden .wpdm-frontend-tabs a,.w3eden .alert:before,.w3eden .panel .panel-heading,.w3eden .discount-msg,.w3eden .panel.dashboard-panel h3,.w3eden #wpdm-dashboard-sidebar .list-group-item,.w3eden #package-description .wp-switch-editor,.w3eden .w3eden.author-dashbboard .nav.nav-tabs li a,.w3eden .wpdm_cart thead th,.w3eden #csp .list-group-item,.w3eden .modal-title{font-family:Rubik,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-transform:uppercase;font-weight:700}.w3eden #csp .list-group-item{text-transform:unset}</style><style></style><style>:root{--color-primary:#4a8eff;--color-primary-rgb:74,142,255;--color-primary-hover:#5998ff;--color-primary-active:#3281ff;--color-secondary:#6c757d;--color-secondary-rgb:108,117,125;--color-secondary-hover:#6c757d;--color-secondary-active:#6c757d;--color-success:#018e11;--color-success-rgb:1,142,17;--color-success-hover:#0aad01;--color-success-active:#0c8c01;--color-info:#2CA8FF;--color-info-rgb:44,168,255;--color-info-hover:#2CA8FF;--color-info-active:#2CA8FF;--color-warning:#FFB236;--color-warning-rgb:255,178,54;--color-warning-hover:#FFB236;--color-warning-active:#FFB236;--color-danger:#ff5062;--color-danger-rgb:255,80,98;--color-danger-hover:#ff5062;--color-danger-active:#ff5062;--color-green:#30b570;--color-blue:#0073ff;--color-purple:#8557D3;--color-red:#ff5062;--color-muted:rgba(69,89,122,.6);--wpdm-font:"Rubik",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.wpdm-download-link.btn.btn-primary{border-radius:4px}</style> 
    • This reply was modified 2 years, 3 months ago by rabox66.

    From the class name “w3eden” you can see that the code belongs to the Plugin Download Manager, which is also named as a generator just above: https://www.ads-software.com/plugins/download-manager/ – I just installed it locally and can immediately reproduce it. In its settings under Download > Settings > User Interface you can select a Google Font. If you set it to “NONE SELECTED”, no font will be loaded in frontend.

    Thread Starter rabox66

    (@rabox66)

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No Google Fonts’ is closed to new replies.