Here’s a gist handcrafted by yours truly. If you want to load a Google Font or any other <link> for that matter in JavaScript instead of setting it directly in the DOM, here’s how to do that while avoiding Flash of Unstyled Text (FOUT).