-
Notifications
You must be signed in to change notification settings - Fork 273
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
Is this library redundant with "font-display"? #133
Comments
my personal intuition is that combining:
will yield better results for browsers that correctly implement the web standards, but "better" is subjective and probably depends a lot on your personal preferences and use cases. I feel like FFO will produce a more consistent experience across browsers, but it's definitely a bit more complicated to use and adds a small hit in terms of script parsing and execution time. (these are just feelings, no real world examples!) |
Thanks for the comment. It's also worth noting there is an offical draft spec for promise-based font loading, maybe this library could act as some polyfill. Support is pretty decent: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/load |
One major advantage of FFO just occurred to me - you can wait for all the fonts you care about to load before applying any of them. If you have a lot of fonts, it seems beneficial from a user perspective to do one big sweep of the document vs. adding them incrementally as they load in (depending I guess on personal preference/design direction). I think you could code this yourself, especially with that |
I came to see if I could learn more about this now that Adobe Fonts has a I'm curious if there are additional cases beyond browser compatibility when it's beneficial to use this library instead of |
Now that browser support for
font-display
is pretty good which is supported in Chrome, Firefox, Safari, iOS (though no IE11 + Edge) - would you still recommend to use this library?It would be good if the docs could comment on when this library is useful compared to
font-display
- personally I've had trouble implementing this library (with local storage caching) and still cannot prevent FOUT, but font-display works perfectly.The text was updated successfully, but these errors were encountered: