Skip to content

Bug: Fonts selected from search results don't load #302

Description

@nonissue

Hey!

Not sure if this project is still active, but I found it while searching for an easy resource to try out different Google font combinations. I really like the design, and it's the best tool I've found.

There is a bug though — if you change the body/header font by selecting a font from the initial list, everything works okay.
But if you instead search for a font in the search input, select the font you want ("Inter" for example), you can see a failed request to google fonts.

[Error] Failed to load resource: the server responded with a status of 400 () (css, line 0) 
https://fonts.googleapis.com/css?family=undefined:regular

I think the 'regular' variant of the font does actually load, but if you try to change to any other variant, it doesn't load, and you can view another failed request in the console.

[Error] Failed to load resource: the server responded with a status of 400 () (css, line 0) 
https://fonts.googleapis.com/css?family=undefined:700italic

I spent some time troubleshooting things locally, and I think I figured out the cause, and I'll submit a pull request shortly with the changes (only minor modifications were required).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions