Skip to main content

Brizy still loads Lato from fonts.bunny.net despite local default font

Comments

4 comments

  • Ariel H.

    Hi Tadi,

    Thank you for contacting us.

    Could you please try adding the following snippet to your child theme’s functions.php file? Alternatively, you can add it through the WPCode plugin as a PHP snippet set to run everywhere:

    add_filter('style_loader_src', function ($src) {
        if (strtolower((string) wp_parse_url($src, PHP_URL_HOST)) === 'fonts.bunny.net') {
            return '';
        }

        return $src;
    }, PHP_INT_MAX);

    This snippet blocks stylesheets served from fonts.bunny.net when they are loaded through WordPress’s enqueue system, while leaving other stylesheets unchanged.

    After activating it, please clear your website and browser caches and check whether the Bunny Fonts request has stopped.

    Best regards,
    Ariel H.

    0
  • Marcus Oliver Krämer

    Hi Ariel,

    thank you. We've implemented the filter and tested it - successfully!

    Just to clarify: Is this intended as a permanent solution, or only as a workaround?

    Since Lato has already been completely removed from the Brizy Font Manager, our locally hosted Roboto font is set as the default font, and all Global Typography settings use Raleway, we would expect Brizy not to enqueue fonts.bunny.net in the first place.

    Could you please confirm whether the continued generation of the Bunny/Lato stylesheet is a known Brizy issue and whether it will be fixed in a future update?

    We would prefer to remove the external font request at its source rather than permanently filtering it through WordPress.

    Best regards

    Tadi

    0
  • Ariel H.

    Hi Tadi,

    Thank you for confirming that the filter worked.

    The snippet is a workaround that prevents the Bunny Fonts stylesheet from loading. The same approach is used by other themes and plugins to disable Google Fonts and other external font libraries by filtering or dequeueing their stylesheets.

    We can submit a feature request for Brizy to provide a built-in option to disable external font requests, removing the need for a WordPress filter. While we can’t guarantee when or whether this option will be included in a future update, we understand why it would be useful.

    For now, please keep the filter enabled to block the request.

    Best regards,  
    Ariel H.

    0
  • Marcus Oliver Krämer
    Hi Ariel,
     
    thanks for the explanation and for this workaround until a dedicated solution is available.
     
    Best regards,
    Tadi
     
    0

Please sign in to leave a comment.