Posted By

emdin on 12/05/10


Tagged

core cufon


Versions (?)

Quick callback for Cufon.registerFont


 / Published in: JavaScript
 

Cufon (http://cufon.shoqolate.com) font files automatically invoke Cufon.registerFont method after load. Since we cannot change files format, we should override this method so it will call our custom callback. This is useful if we want to add some custom functionality which will run after Cufon font is loaded.

  1. var fn = Cufon.registerFont;
  2. Cufon.registerFont = function(data) {
  3. fn(data);
  4. some callback...
  5. }

Report this snippet  

You need to login to post a comment.