The core of WhatFont Tool
whatfont_core.jsis the core script. It adds
_whatFont()into the global scope. WhatFont then runs in a closure created by the
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:
WhatFont requires jQuery (v1.5.2), if jQuery has already been loaded into the global scope, the script finds it automatically. Otherwise
setJQuery(jQ)needs to be called to set up jQuery object.
WhatFont injects its stylesheet file into the webpage. The script comes with a default URL setting, if you want to change the setting, calling this function.
Return the version of WhatFont.
Initialize WhatFont and inject to the current
Remove WhatFont from current
wf = _whatFont(); wf.setjQuery(jQuery); // Setup jQuery wf.init(); // Load WhatFont wf.restore(); // Remove WhatFont