Mando Group Labs

Work With us

If you have a proof of concept or RIA you would like us to develop email or call Ian on 0845 365 4040

Google WebFont Loader

Posted on by Sam Birch

I’ve been playing with google’s new webfont loader api with typekit integration over the past few days. The main reason for using api is for the events that it exposes.

Having the ability to know when a font or all custom fonts have loaded is extremely useful! I use these events to trigger showing the page content when the fonts have loaded so i don’t have the nasty ‘jumps’ once the custom fonts replace the system fonts.

One thing to note, which took a little while to figure out, is that the api documentation states that the usage for using typekit via the webfont loader is:

WebFontConfig ={
  typekit: 'myKitId'
};

when in actual fact the correct way to use it is:

WebFontConfig ={
  typekit: {id:'myKitId'}
};

hope this helps anyone who was having the same issue as me! :)

This entry was posted in Google, JavaScript. Bookmark the permalink.
Share