Archived topic
Unable to change Lato font size and character spacing
9 replies · Started by Ben on July 23, 2020
I have loaded Google fonts and am able to select all the sizes and spacing I need in elementor.
However, in the GeneratePress customize view, I am only able to select 300, 500, 700 and 900 and increment the character spacing by 1 (not 0.5).
Could you please help me with this? I need a font size of 800 and a character spacing of 0.5 for my fonts!
Hi there,
You can add to the available variants like this:
add_filter( 'generate_google_fonts_array', function( $fonts ) {
$fonts['lato']['variants'] = array( '300', '500', '700', '800', '900' ); // Add as many as you like.
return $fonts;
} );
How are you currently adjusting the letter spacing?
I am currently changing the character spacing in the typography section on the customize view, using the slider.
add_filter( 'generate_google_fonts_array', function( $fonts ) {
$fonts['lato']['variants'] = array( '300', '500', '700', '800', '900' ); // Add as many as you like.
return $fonts;
} );
Also this isn't CSS so I am unable to add it to the Additional CSS section...it's returning an error. Where am I meant to add this?
Thanks...could you also let me know about the character spacing?
Hi - the snippet you've given isn't working. I've added the snippet, activated it and it's not appearing in the typography section of the customize view...
Is it only 800 that is missing? If so thats because it doesn't exist:
https://fonts.google.com/specimen/Lato?query=lato
Elementor may be allowing you to set 800 but the browser will just use the closest match.
Can you provide a screenshot of the character spacing setting you're using ?
Hi here is the link
Thats not GP's customizer options for typography.
Do you have any other plugins installed that would extend those options ?