Site logo

Archived topic

Embed 'generatepress' fonts in CSS

5 replies · Started by Milan Petrović on September 18, 2020

Viewing posts 1–6 of 6

Hi,

I have noticed that 'generatepress.woff2' and 'generatepress.woff' are very small, and it would be better to have them included in the CSS file as base64 encoded, and it will not make the CSS much bigger but will eliminate font loading for 99% of browsers, and it will greatly improve the performance of the CSS and fonts loading.

If you don't want to do that, what is the best way to override with child theme the way the theme load fonts, and make that change?

Regards,
Milan

Hi there,

the simplest and best solution is to change the Icon Type to SVG in Customizer > General.
This removes the font and inlines the SVG icons.

Thanks for the reply. Yeah, I know about that, but I still prefer using font icons, and I have done this with a few of my plugins that have small fonts (up to 10KB), that give a great performance boost on tests like PageSpeed.

Its not something we would look at adding inside the themes CSS.
You could of course dequeue the fonts and add that into your own style sheet.

Ok, thanks.

No problems. I'll pass this onto Tom for future reference. Thanks for your insights!

This archived topic is closed to new replies.