beatleader-website icon indicating copy to clipboard operation
beatleader-website copied to clipboard

Improved importFonts() so that it doesn't try to load invalid Google font URLs

Open riskable opened this issue 6 months ago • 0 comments

This gets rid of the errors (and unnecessary web traffic) when a theme tries to load a font that exists locally on the user's machine (that may not even exist on Google's font service). It's also smart about when a font is specified as a generic family name like sans-serif or monospace.

If a user specifies a font that they don't have locally on their system and doesn't exist in Google's font service it'll still throw an error (which is what we want; I think).

riskable avatar Aug 15 '24 18:08 riskable