Archived topic
"Barlow" Google Font Missing
5 replies · Started by Kevin on March 20, 2019
Hi there,
I can not find "Barlow" Google Font in the customizer.
I have added this filter to my child theme and I have many more fonts than normal, just not "Barlow":
add_filter( 'generate_number_of_fonts','tu_show_all_available_google_fonts' );
function tu_show_all_available_google_fonts() {
return 'all';
}
Odd have you tried just adding that font as opposed to all?
I can get the Barlow font to load with this code:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'barlow' ] = array(
'name' => 'Barlow',
'variants' => array( '400', '500', '600', '700', '800' ),
'category' => 'sans'
);
return $fonts;
}
But not when using this code:
add_filter( 'generate_number_of_fonts','tu_show_all_available_google_fonts' );
function tu_show_all_available_google_fonts() {
return 'all';
}
The ALL list is something that needs regularly updating which we haven't done in a little while. We may find a better solution but in the meantime we recommending loading the individual fonts as you have done.
I understand. Thanks for helping! Great service as always.
You're welcome