Skip to content

derek1906/jFont-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published