Re:Angular 11
by IggleSniggle on Thursday November 12, 2020 @05:01PM
(#25075710)
If the font is already loaded, then inlining is hurting rather than helping. Browsers will cache fonts and external libraries between sites when they are identical, so your users might even already have the font loaded: by inlining, you've forced them to load it again, even if they already had it in their local cache.
But if it's about having the font directly in the bundle encoded in base64 to save a http request, you can do that with webpack for example. But from what I understood, base64 encoded content is often slower to load than the same content served over http 2.
I don't know if others are automatically downloading the fonts to include them in the build. It's a nice feature but you can also install many Google fonts from Npm.