Checking font availability with jQuery

FontAvailable is a short and brilliant jQuery plugin (put together by Howard Rauscher), that allows to check if ceratin font is installed on a visitor’s computer/device. Why, you ask? So you can select an adequate method of enhancing your website/webapp typography (@font-face, sIFR, typeface.js, cufón, etc.).

$(document).ready(function() {
    if($.fontAvailable('klavika')) {
        // @font-face
    }else{
        // sIFR / typeface.js / cufón
    }
});
Published: | This entry was posted in programming and tagged , , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>