Site logo

Archived topic

Removing Unneeded Fonts

5 replies · Started by Janine on January 4, 2021

Viewing posts 1–6 of 6

Hi.

How do I remove unneeded fonts? Thank you.

Hi,

If you kept all your fonts on Appearance > Customize > Typography, you can remove some of the unused variants:
https://docs.generatepress.com/article/google-font-variants/

And if you don't use Google fonts at all(hosting fonts locally), use this function:

add_action( 'wp_enqueue_scripts', function() {
    wp_dequeue_style( 'generate-fonts' );
}, 100 );

In other words, if I select two fonts: one for my headings and one for the body and three variants, I am then only loading those two fonts and the three selected variants? See screenshots.

Thank you.

Hi there,

thats correct, GP will only make the request for those fonts and the variants you have left enabled.

Thank you, David.

You're welcome

This archived topic is closed to new replies.