[Resolved] Add more Google Fonts

Home Forums Support [Resolved] Add more Google Fonts

Home Forums Support Add more Google Fonts

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #203922
    Mike

    I’ve been testing new Google fonts lately and noticed some are missing from the list like Roboto Light. Can the list be updated and perhaps have a search function to facilitate finding fonts in the dropdown?

    #203976
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Roboto is in the list – then you can set the font weight to something low to get the light version.

    As for searching, once the dropdown is open, if you start typing the font name it should jump to it πŸ™‚

    #204022
    Mike

    Thanks Tom, it does jump but only based on the first letter. So if I start typing Droid, it goes to the D fonts and then to the R fonts.

    #204062
    Tom
    Lead Developer
    Lead Developer

    Ah yes, I’ll see if there’s a script that can allow better searching.

    #205616
    Erik Bell

    I have noticed some fonts are not included in the drop-down list, such as Heebo, Prompt, Suez One, and probably many others. I understand it might not be useful or efficient to list ALL the available Google Fonts – how can I use one of the fonts that is not listed?

    #205646
    Tom
    Lead Developer
    Lead Developer

    It’s probably time to update the list in GP.

    You can always set all of the Typography options in the Customizer to “inherit”, then include the code Google fonts gives you in the wp_head hook.

    Then you just need to add the CSS they provide and you’re good to go.

    Let me know if you need more info πŸ™‚

    #393605
    sr cola

    I try to find the place in the code that controls the google fonts available in the elementor font interface, I guess is this:
    wp-content/themes/generatepress/inc/add-ons/typography.php
    In line: 1155
    $content = json_decode([…])
    I add another json element to the font list, especifying the font that i need. Then i save the PHP file an rerun the config interface again but nothing happens. I guess i am missing something. Please what am i doing wrong? I want to make a quick fix while any update is available.

    Thanks for your help

    #393663
    Tom
    Lead Developer
    Lead Developer

    No need to edit core files. This should help: https://docs.generatepress.com/article/customizing-the-google-font-list/

    #393691
    sr cola

    Thanks Tom, wonderful, you saved me.
    Great theme, great resources

    #393693
    Tom
    Lead Developer
    Lead Developer

    Glad I could help πŸ™‚

    #702970
    Cat

    Hi Tom, just a question on this.

    I have added a custom font before that wasn’t on the list and it worked perfectly.

    Now I wanted to add another (second) new font but am not sure how to add this onto the existing code in the functions file (I’m guessing I need to extend the array but I am not sure the syntax.

    Can you advise? Thanks
    Catherine

    #703118
    David
    Staff
    Customer Support
    #703361
    Cat

    Thank you David! That’s perfect.

    #703364
    David
    Staff
    Customer Support

    You’re welcome

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.