Site logo

Archived topic

Cannot Call Grandstander Google Font

5 replies · Started by Ian on September 15, 2020

Viewing posts 1–6 of 6

I have used this:

add_filter( 'generate_number_of_fonts','tu_show_all_available_google_fonts' );
function tu_show_all_available_google_fonts() {
return 'all';
}

But still cannot call the font Grandstander in Customizer. Any ideas?

Hi there,

Let's try this snippet instead:

add_filter( 'generate_typography_customize_list', function( $fonts ) {
	$fonts[ 'grandstander' ] = array( 
		'name' => 'Grandstander',
		'variants' => array( '100','100i','200','200i','300', '300i', '400', '400i', '500', '500i', '600', '600i', '700', '700i','800','800i','900','900i', ),
		'category' => 'serif'
	);
	
	return $fonts;
} );

Hey Leo, that worked perfectly! Is this because Grandstander is not a very popular font and that's why it does not show up inside the GP Customizer?

Your snippet should work as well - I believe it's something we need to update on our end :)

It's better to use my snippet anyway so you are not loading all the unused font in the customizer.

Perfect, thank you!

No problem :)

This archived topic is closed to new replies.