Archived topic
Load Google Font (Jost)
13 replies · Started by fabiosilva on December 21, 2021
Hi,
I read this documentation:
https://docs.generatepress.com/article/customizing-the-google-font-list/
To load a "Jost" font (listed on Google Gonts)
https://fonts.google.com/specimen/Jost?query=jost
I try use this code to load all fonts:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'jost' ] = array(
'name' => 'Jost',
'variants' => array( '100', '100i', '200', '200i', '300', '200i', '400', '400i', '500', '500i', '600' , '600i', '700', '700i', '800', '800i', '900', '900i'),
'category' => 'serif'
);
return $fonts;
}
But on GP Theme Customizer, not work fine. I'm doing something wrong?
Thank you for your help and Merry Christmas
Hi there,
are you using the latest Customizer > Typography settings ie. the one with the Font Manager?
And Merry Christmas to you too :)
Hi, David
Yes. So... I'm not sure about your question. But, maybe this print helps:
https://i.ibb.co/QjDx13Q/print.jpg
Thank you
Thats the older typography system.... hmmm that code should work.
How was that PHP Snippet added to the site?
Through functions.php (using child theme)
Might be easier to:
1. remove that snippet.2
2. switch to the new Typography settings which you can enable in Customizer > General.
Jost is inlcuded in the new system.
Thank you, David!
Works fine and this new Typography settings is PERFECT! :-)
Glad to be of help!
Hi, David
I thought the problem was solved, but no. :-(
Font Maneger Works fine. I've selected Jost Font, and variants all loaded automatically (100, 200, 300, regular, 500, 600, 700, 800, 900, 100italic, 200italic, 300italic, italic, 500italic, 600italic, 700italic, 800italic, 900italic)

The problem:
On Font-Weight, only 3 variations works. The rest, nothing happens. And italics don't even appear.

Is there any configuration missing?
Thank you
Can you share a link to the site where i can see the issue?
Hi, David
Yes! I add on private information.
Thank you.
Hi there,
I'm not sure I see the issue.
I've checked the assets that load on the site and I see that Jost loads properly on it - https://share.getcloudapp.com/yAukjW2A
As you can see in this comparison, it looks correct - https://share.getcloudapp.com/rRuNPvl9
I've also checked the variants and they're being added properly.
As for verifying if the customizer settings are correct, I was unable to because the credentials provided don't work. Can you check it and confirm if it's correct? Let us know.
Hi, Elvin
I was having a problem with the customizer. But I cleared cookies and now it's working.
Thank you very much for your help. :-)
Glad you got it sorted. Thanks for letting us know. No problem. :D