WPTT / webfont-loader

Download webfonts and host them locally on a WordPress site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with fontlibrary fonts

UVLabs opened this issue · comments

It doesn't seem like the library is able to handle fonts with a url set as a path relative to the domain of the site? Example fonts from https://fontslibrary.com like this one: https://fontlibrary.org/en/font/unique

If you look at the source url for loading this font here: https://fontlibrary.org//face/datalegreya the url is set as a path relative to the domain, what happens is the CSS is downloaded when using wptt_get_webfont_styles or wptt_get_webfont_url but this will cause a console error because the font would try to load from https://yourwebsite.com/assets/fonts/datalegreya... when the font CSS file is loaded

@UVLabs I just pushed a commit on 780e564 that should fix this issue.
Can you please pull the latest version and confirm? Thanks!