Archived topic
Google Fonts, Variants do not appear
15 replies · Started by DAVID on March 12, 2020
Hi!
I ve the same problem than
https://generatepress.com/forums/topic/add-2-or-3-custom-google-font/
But the solution you proposed doesn't work for me. The variants still do not appear to me.
The font is Crimson Pro and Im working "local" (I don't know if that matters).
Salud!
Hi there,
Can you share the PHP you're adding?
Excuse me Tom, I've already fixed it. Your simple question has helped me ...
The information contained in the link that I put above really solved the problem but I had written something wrong in my functions.php.
Salud, gracias!
Glad you got it working! :)
Hey Tom, we're getting this issue as well.
It happens when adding any of the following PHP snippets: https://docs.generatepress.com/article/customizing-the-google-font-list/#adding-your-google-font-to-the-list
Note: it also occurs specifically for the Inter font. Not currently occurring for any other font that I have tested it with.
Thanks in advance. Happy Holidays!
Hey Alex,
This should no longer be necessary with our dynamic typography feature: https://www.youtube.com/watch?v=mNAlQDNyJPg
No need for PHP filters anymore - simply add the font name and you should be good to go.
Happy Holidays!
Hey Tom,
Ah, that's great to hear – definitely simplifies things.
However, we're having some issues with the bold variation of the font not appearing on mobile.
Example on Desktop: https://c.scalemath.com/AOy3AW (see part that is bolded)
Live URL to test on mobile: https://scalemath.com/blog/bounce-rate/
Very strange, not sure what on our end could be affecting it, seems to only happen with Inter. 😄
Thank you for the help...
Have you resolved this?
The bold font is indeed working when I checked the page using the Chrome simulator:
https://www.screencast.com/t/pzGDY4U5tn
Hi Leo, hope you’re well.
It has not been. The issue doesn’t occur on Desktop (i.e in Chrome), however it still occurs on mobile devices / browsers (Safari for iOS and Chrome for iOS have been tested, and it is the same in both of those instances).
That is very strange.
So if you switch a font then everything works well?
Yep, that’s correct — only observing it with Inter at the moment.
And just to confirm, you've added the variants to the variants field? I'm still seeing the old typography system in place (with no variants added): https://www.screencast.com/t/QwidZPk9O
Hi Tom, that is the issue. With the Inter font, it does not appear possible to add the variations – it simply returns a "no variations found" error: https://c.scalemath.com/DUYz6M
Hi Alex,
Can you switch to the new typography system and try again?
Go to Customize > General” and check the “Use Dynamic Typography” option.
For more info: https://docs.generatepress.com/article/switching-to-dynamic-typography/
Demonstration video: https://youtu.be/mNAlQDNyJPg
I just tested on my site and the inter font is not missing variants:
https://www.screencast.com/t/BTFgPA7jhIx
Hi Ying, thank you – this seemed to do the trick. Take care & Happy New Year!