Google fonts “combine and link deferred” results in faulty request string
-
Hiya, I’ve had a problem related to AO’s Google fonts handling in recent versions.
I was previously using “combine and preload” for my font handling, but since that’s unavailable for now I tried other options. However, “combine and link deferred” gives a weird result with my theme.
In the console it appears as a javascript error due to MIME type mismatch, but the real problem is that the request string in the page source is coming out as
https://fonts.googleapis.com/css?family=&display=swap
. Which obviously doesn’t exist.In case it’s important, I’m loading my fonts using wp_enqueue_style and the embed string from Google Fonts itself. Like so:
wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@700&family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=fallback', false );
Any idea if this is a problem with AO? Or am I doing something unexpected with my fonts?
Thanks for your time! (And your ongoing work with AO, which has been invaluable to my builds.)
- The topic ‘Google fonts “combine and link deferred” results in faulty request string’ is closed to new replies.