You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this awesome module to dynamically enqueue fonts but, since it is possible that it will fail to download some font families or weights, I would like if WPTT/webfont-loader could handle the error message and display it.
Currently the server error message is queued as a style (and this creates some layout glitches, at least with my template since it's an html message) and it would probably be better to display that error at the top of body (eg. like as when React makes a compilation error)
I am using this awesome module to dynamically enqueue fonts but, since it is possible that it will fail to download some font families or weights, I would like if WPTT/webfont-loader could handle the error message and display it.
Currently the server error message is queued as a style (and this creates some layout glitches, at least with my template since it's an html message) and it would probably be better to display that error at the top of body (eg. like as when React makes a compilation error)
This is the code in which the request is made:
webfont-loader/wptt-webfont-loader.php
Lines 262 to 272 in 19fa29b
I think it would be enough to add something like below to solve (just after "is_wp_error").
An error message for testing -> https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@700;600;500&family=Merriweather:wght@500;700&family=Material+Icons&display=swap
The text was updated successfully, but these errors were encountered: