Skip to content

Conversation

@doriansmiley
Copy link

We use this lib in several projects and were getting a lot of timeouts for fonts that actually did load. After fixing several issues related to the handling of the returned promise I still found that in browsers that natively support the font loading API there were issues. After evaluating the code the most likely culprit appeared to be document.fonts.load. Replacing with check resolved our issues. However I wan only able to run our tests against the revised lib. When I ran grunt test I got some errors about not being able to execute phatomJS. So you'll want to test this change.

document.fonts.load was failing to return. I think it may have to do with the resolution of promises but check works perfectly.
@HunterLarco
Copy link

+1 also having this issue. It looks like load will force a unique font load for every time it's called, resulting in loading a single font family many times over. Right now this bug increases our network traffic by ~14 MB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants