-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fires before custom font is applied #45
Comments
@andrewtibbetts Yes, waiting for fonts to load is a pain. Do you have a link to your solution that I could look at? If it's not too involved maybe we could integrate it with this polyfill, but at least I'd like to provide info to others that have same problem. Thanks. |
I’m using this: https://github.com/patrickmarabeas/jQuery-FontSpy.js https://github.com/patrickmarabeas/jQuery-FontSpy.js Then call it like so: $('p').fontSpy({ onLoad: 'balance-text' }); when the dom is ready. |
I don't know about the fontSpy plugin, but I know for TypeKit you can make sure balance-text only gets executed after the font is loaded like this:
Make you can check the fontSpy API for anything similar. |
Found a better script: https://github.com/JenniferSimonds/FontDetect |
Unfortunately this is not easy to automatically track, the only thing we could do is add a note about it and a suggested solution(s) in the readme. Embedding FontDetect and trying to figure out whether it's needed is probably too much for this plugin. |
I'm having to use jquery.fontspy.js to hold off balancing until my @font-face applies. Otherwise it balances according to default font.
The text was updated successfully, but these errors were encountered: