jQuery-FontSpy.js
jQuery-FontSpy.js copied to clipboard
Add updates to prevent FOUC
Added a quick example (and doc) on how to hide text block while custom font is loading.
This doesn't allow for each font to appear as loaded - couldn't we simply hide/show content based on fontName/no-fontName classes on html element?
Ah your right. What are you thinking for showing/hiding content based on the fontName/no-fontName classes?
Ah assumed fontName class was added on success. Could either do that, or add a fontName-loading class
Reworked the styles and JS a bit so there is a class hook to hide elements using custom fonts on load. Then hooked into the fontname class that is added on success/failure to display elements using custom fonts.