chengyin / WhatFont-Bookmarklet

The core of WhatFont Tool
http://chengyinliu.com/whatfont.html
University of Illinois/NCSA Open Source License
489 stars 75 forks source link

WhatFont

WhatFont is a JavaScript script to detect what font in the stack is being used on any elements of a web page.

Here in the repo is the core component with out wrappers, the wrapped Chrome/Safari extensions are available at http://chengyinliu.com/whatfont.html.

How to Use

whatfont_core.js is the core script. It adds _whatFont() into the global scope. WhatFont then runs in a closure created by the _whatFont() function.

An controller object is returned by whatFont() function. The controller will be used to set up the dependencies (jQuery and stylesheet) and initialize WhatFont.

This controller has the following functions:

Example


wf = _whatFont();       
wf.setjQuery(jQuery);       // Setup jQuery
wf.init();                  // Load WhatFont
wf.restore();               // Remove WhatFont