Hey guys!
I’ve just followed this tutorial on how to add custom font https://docs.generatepress.com/article/adding-local-fonts/
but, although I can choose it from the Customize/Typography settings, I don’t think it’s loading at all.
Here is the code I have added to Simple CSS:
@font-face {
font-family: "Monty";
src: url(public_html/wearefesta/wp-content/themes/generatepress/assets/fonts/Monty-Bold-Trial.woff2) format("woff2"), url(public_html/wearefesta/wp-content/themes/generatepress/assets/fonts/Monty-Bold-Trial.woff) format("woff");
font-weight: bold;
}
@font-face {
font-family: "Monty";
src: url(public_html/wearefesta/wp-content/themes/generatepress/assets/fonts/Monty-Light-Trial.woff2) format("woff2"), url(public_html/wearefesta/wp-content/themes/generatepress/assets/fonts/Monty-Light-Trial.woff) format("woff");
font-weight: normal;
}
and here is the PHP snippet I have created:
add_filter( 'generate_typography_default_fonts', function( $fonts ) {
$fonts[] = "Monty";
return $fonts;
} );
Hope you can help with this!
Cheers,
G