title: Google Web Fonts loading after layout has rendered
body: <p>I have a script on my page that rearranges a bunch of boxes into a pinterest like mosaic, using the excellent jQuery Masonry plugin. I call the box layout rendering method like this from the bottom of the page (just before ):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(function() {
      wall.drawBoxes();
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>I also use google web fonts like this, just after the  tag: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    WebFontConfig = {
      google: { families: [ 'Montserrat::latin' ] }
    };
    (function() {
      var wf = document.createElement('script');
      wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
        '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
      wf.type = 'text/javascript';
      wf.async = 'true';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(wf, s);
    })(); 
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is the boxes are rendered before the font has been loaded. And when the font has loaded, the boxes increase in size, making the rendered mosaic layout look like crap.</p>
  
  <p>What can I do to prevent that?</p>