Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

jFont Checker

This simple tool checks for the existence of a specified font. It ultilizes the font fallback mechanism in CSS for font checking.

Usage

Simply call checkfont, and it will return the font status in boolean:

var isTimesExist = checkfont("Times"),           //true (if exists)
    someWeirdFont = checkfont("CookieMonster");  //false

For whatever reason you need to test on a different DOM, another window for example (limited by SOP), you can pass that in too.

var win = window.open("/another_page");
checkfont("Century Gothic", win.document);

About

This API checks for the existence of a specified font.

Resources

License

Releases

No releases published
You can’t perform that action at this time.