• Waiting for web fonts to load

    While working on a project where I was required to sample dimensions of HTML elements with specific web fonts, I have bumped into a problem. There wasn’t any DOM event that signaled that specific fonts are loaded and rendered. Even though all the fonts were base64 encoded and inserted into a web page immediately after XMLHttpRequest response, it didn’t indicated that these fonts were actually rendered and that elements enclosing them received their final dimensions.