Archived topic
Google Font: Inter, not included in GP, add local fonts?
7 replies · Started by Morgan on April 17, 2021
Hi, I realise there are ways to manually add google-fonts, and am planning to add locally (I've tried a few plugins but most have created more problems that they're worth, no speed improvement, conflicts etc) - I've seen a few recommended ways to do this here, but thought I'd check - what's the latest recommended way to include local fonts with GP Pro?
Ideally would like to do as little as possible, code snippet or somesuch and have fonts work seamlessly with the GP Customizer font settings. I'd use a max of 2 fonts sitewide.
And, also - the Google Font Inter isn't appearing in Customizer - this is the font on https://en-au.wordpress.org/themes/twentytwenty/
Hi there,
you can add any missing google font to the customizer using one of the snippets here:
https://docs.generatepress.com/article/customizing-the-google-font-list/
However, Inter is a Google Variable font - and using the above method won't work correctly with Variable fonts.
Instead you would have to install them locally on your site:
Finally got around to this, got it working, but used explicit url to fonts: http://screen.coach/wp-content/themes/generatepress_child/fonts/ as neither url('/fonts/ . . . or url('fonts/ . . . worked.
Glad to hear that!
Does it only work with complete url, I.e. http://screen.coach/wp-content/themes/generatepress_child/fonts/ ?
Might be good to make this clearer in docs :)
If loaded via the Media Attachments then yes - which is shown and explained in the docs.
Child Theme installation is not 100% necessary, as relative paths can be used - but as a general rule adding the full URL is always best.
Got it, thx.
You're welcome