- This topic has 9 replies, 3 voices, and was last updated 6 months ago by
David.
-
AuthorPosts
-
July 23, 2020 at 12:22 pm #1373923
Ben
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!
July 23, 2020 at 2:44 pm #1374046Tom
Lead DeveloperLead DeveloperHi 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?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 24, 2020 at 2:34 am #1374501Ben
I am currently changing the character spacing in the typography section on the customize view, using the slider.
July 24, 2020 at 2:45 am #1374521Ben
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?
July 24, 2020 at 2:50 am #1374528David
StaffCustomer SupportHi there,
that code is PHP:
https://docs.generatepress.com/article/adding-php/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 24, 2020 at 3:01 am #1374535Ben
Thanks…could you also let me know about the character spacing?
July 24, 2020 at 3:04 am #1374544Ben
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…
July 24, 2020 at 4:09 am #1374582David
StaffCustomer SupportIs 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 ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 24, 2020 at 7:09 am #1374706Ben
Hi here is the link
July 24, 2020 at 8:39 am #1374965David
StaffCustomer SupportThats not GP’s customizer options for typography.
Do you have any other plugins installed that would extend those options ?Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.