I'm using jQuery Masonry to lay out my page, but I'm using a custom @font-face font. The problem being that Masonry doesn't know the metrics of the font until it's loaded.
The Masonry docs suggest that you use $(window).load() instead of $(document).ready() to call the layout functions, but I don't want to have to wait until all the images etc. load. I can specify the dimensions of the images exactly, so Masonry doesn't need to wait until they're loaded. It's just the text that's the problem.
How can I get jQuery to call a callback when the <link> element that links in the font finishes loading?
EDIT: The obvious solution (that is, $('#link_id').load(...)) doesn't seem to work.
EDIT2: I didn't realise (stupid of me) that the <link> element is actually linking in a stylesheet with a @font-face declaration. I want to wait until the font has been loaded, not just the stylesheet...