Make WordPress Core


Ignore:
Timestamp:
05/31/2019 10:09:39 AM (5 years ago)
Author:
flixos90
Message:

Bundled Theme: Load Google fonts with display=fallback parameter for better UX in case the font cannot be loaded.

Providing this query parameter ensures the stylesheet contains the font-display: fallback rule. This changeset also updates the Open Sans font used by core accordingly.

Props westonruter.
Fixes #47282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r45481 r45485  
    19201920
    19211921        // Hotlink Open Sans, for now
    1922         $open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";
     1922        $open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets&display=fallback";
    19231923    }
    19241924
Note: See TracChangeset for help on using the changeset viewer.