You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Faster loading of Global Typography Google Font #3467
Currently if you use a Google Font in the Global Typography, and inside a block (e.g. Text block), both are always loaded in the footer of the site - which makes the font load slower.
Change this so that
Google Fonts used in the Global Typography are loaded in the head using best practices
Google Fonts used in the blocks (and not yet loaded from the Global Typography) will be loaded in the footer like the current implementation
Implementation
All Google Fonts are currently enqueued in src/fonts.phpregister_font() function, and performed in the wp_footer hook. We need to change this implementation so that we will enqueue Google Fonts 2 times:
Early calls to register_font() will load the Google Fonts in the <head> tag with preloading
Activity