src/js/base/core/agent.js
function (fontName) {
    var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';
    var $tester = $('<div>').css({
      position: 'absolute',
      left: '-9999px',
      top: '-9999px',
      fontSize: '200px'
    }).text('mmmmmmmmmwwwwwww').appendTo(document.body);

    var originalWidth = $tester.css('fontFamily', testFontName).width();
    var width = $tester.css('fontFamily', fontName + ',' + testFontName).width();

    $tester.remove();

    return originalWidth !== width;
  }
function (fontName) {
    var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';
    var $tester = $('<div>').css({
      position: 'absolute',
      left: '-9999px',
      top: '-9999px',
      fontSize: '200px'
    }).text('mmmmmmmmmwwwwwww').appendTo(document.body);

    var originalWidth = $tester.css('fontFamily', testFontName).width();
    var width = $tester.css('fontFamily', fontName + ',' + testFontName).width();

    $tester.remove();

    return originalWidth !== width;
  }
function ( fontName ) { var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS' ; var $tester = $ ( '<div>' ) . css ( { position : 'absolute' , left : '-9999px' , top : '-9999px' , fontSize : '200px' } ) . text ( 'mmmmmmmmmwwwwwww' ) . appendTo ( document . body ) ; var originalWidth = $tester . css ( 'fontFamily' , testFontName ) . width ( ) ; var width = $tester . css ( 'fontFamily' , fontName + ',' + testFontName ) . width ( ) ; $tester . remove ( ) ; return originalWidth !== width ; }
returns whether font is installed or not.

@param {String} fontName
@return {Boolean}
returns whether font is installed or not .