3 var FontFaceObserver = require('fontfaceobserver');
4 var RAF = require('./raf');
5 const cookies = require('./cookies');
7 //We only want to observer events for the default font
8 var font = new FontFaceObserver('source-sans-pro', {
12 font.load().then(function() {
14 document.documentElement.className += ' fonts-loaded';
15 //Store a cookie to say the fonts have been loaded and should be cached
16 cookies.set('webfontsLoaded', true);