What problem does this address?
The initial Webfonts API adds @font-face declarations for every font-family that is registered, regardless if it is used in the css for the page, or not.
With a few fonts, this is not too bad, but with additional font weights and styles, it can quickly add up. One example: Jetpack is adding a Google fonts module, and with ~30 Google fonts registered, there are over 1500 font-face declarations, adding well over 500 KB (uncompressed) to the page source.
What is your proposed solution?
Remove unused font-face declarations on each page to reduce the size of what is added to the page source.
Related tasks
What problem does this address?
The initial Webfonts API adds
@font-facedeclarations for every font-family that is registered, regardless if it is used in the css for the page, or not.With a few fonts, this is not too bad, but with additional font weights and styles, it can quickly add up. One example: Jetpack is adding a Google fonts module, and with ~30 Google fonts registered, there are over 1500 font-face declarations, adding well over 500 KB (uncompressed) to the page source.
What is your proposed solution?
Remove unused font-face declarations on each page to reduce the size of what is added to the page source.
Related tasks