Execute javascript after google webfont is loaded and applied
===

I have a page with a [google webfont][1] and a [jquery plugin for fitting text][2]

I use the following tag to load the font:

    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Dosis:200,300,400,500,600,700,800&amp;subset=latin,latin-ext" />

The plugin works fine if I run the script after the font is loaded.

But if I run it before it calculates the wrong sizes (it fits the default font). For example on jquery's ready it fails, but if I wait 5 seconds it succeeds.

Also in firebug when I debug the fonts seem to be loaded but the calculated sizes show otherwise.

How can I be sure that the javascript calculates with the proper font?

  [1]: http://www.google.com/webfonts/specimen/Dosis
  [2]: https://github.com/chunksnbits/jquery-quickfit