Tagged: Fonts, load speed, performance
Hi there,
My host provides a page performance test, and part of the result that pointed to optimisation was the number of fonts. I suppose this happens through Enfold. I ain’t calling any additional fonts from my custom child theme css file.
This is the report indications:
http://b3.ms/Oq5nRL7e90wB
Is there any way to reduce the number of fonts and font versions to only the ones actually used on the site?
And how do I use WOFF2 font format instead of WOFF?
Thank you,
Emil
Hey Emilvillumsen,
There is no easy way to selectively disable the fonts added in the theme but adding the following code at the bottom of the functions.php will completely disable the loading of the google fonts in the theme.
add_action( 'init', 'enfold_customization_switch_fonts' );
function enfold_customization_switch_fonts() {
global $avia;
$avia->style->print_extra_output = false;
}
You can then define your custom fonts in the child theme style.css file.
Best regards,
Vinay