Customizer typography calls for all font styles
-
Hi Tom,
I just noticed that when you specify a font in the customizer > typography, it creates a style sheet (generate-font-css I think) that combines all the font selections the user made in the customizer.
That’s great, however, it seems that generate-font-css is requesting all the styles for each font family. Even if you specify only one font weight in the customizer, the style sheet is still calling for all the weights and italics.
To compare, I cleared out the customizer font selections, which stopped the creation of generate-font-css. And I included a request for only the font families and weights I needed in the wp-head hook (with prefetch and preconnect). For my site, this cut the size of the font package in half.
Just thinking it might be a nice improvement if the customizer only requested the styles/weights being used.
- The topic ‘Customizer typography calls for all font styles’ is closed to new replies.