[wp-meta] [Making WordPress.org] #5610: Update Google Fonts CSS
Making WordPress.org
noreply at wordpress.org
Thu Feb 11 10:01:56 UTC 2021
#5610: Update Google Fonts CSS
----------------------------+-------------------------
Reporter: jonoaldersonwp | Owner: (none)
Type: defect | Status: new
Priority: lowest | Milestone:
Component: General | Keywords: performance
----------------------------+-------------------------
All pages load Open Sans from Google fonts via the following markup:
{{{
<link
href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin
,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'
rel='stylesheet' type='text/css'>
}}}
This is outdated syntax, and should be replaced with the following.
Note that this introduces `font-display: swap` for some performance
reasons*:
{{{
<link rel="preconnect" href="https://fonts.gstatic.com">
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap"
rel="stylesheet">
}}}
*We'll eventually want to swap this for `optional`, but can't do so
reliably until we have a proper preloading process and
internationalisation process (where we load font variants more
conditionally based on the contennt) in place.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/5610>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list