Webfonts have transformed our webpages into much more individualistic products, but they have one drawback: There's no standard method to detect when a webfont has actually loaded. Even though we try to always specify a good font stack to fall back on in the font-family declaration, sometimes we really need to know if or when a webfont has successfully been loaded - usually so we can adjust some other part of the page to match it to pixel-perfection.
The FontDetect.js library provides a singleton class that can tell you which font is being used for a particular element, or detect whether a font face is available in your browser. It can also poll for the font being loaded and call a callback function when it loads - or another callback if it doesn't load within a timeout period.
How to Use FontDetect
The first step is to download the current version of fontdetect.zip and extract the script file (fontdetect.js or fontdetect.min.js). It can be placed after the