Quick callback for Cufon.registerFont


/ Published in: JavaScript
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. var fn = Cufon.registerFont;
  2. Cufon.registerFont = function(data) {
  3. fn(data);
  4. some callback...
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.