src/js/base/core/env.js
function isFontInstalled(fontName) {
  const testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';
  const testText = 'mmmmmmmmmmwwwww';
  const testSize = '200px';

  var canvas = document.createElement('canvas');
  var context = canvas.getContext('2d');

  context.font = testSize + " '" + testFontName + "'";
  const originalWidth = context.measureText(testText).width;

  context.font = testSize + " '" + fontName + "', '" + testFontName + "'";
  const width = context.measureText(testText).width;

  return originalWidth !== width;
}
function isFontInstalled(fontName) {
  const testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';
  const testText = 'mmmmmmmmmmwwwww';
  const testSize = '200px';

  var canvas = document.createElement('canvas');
  var context = canvas.getContext('2d');

  context.font = testSize + " '" + testFontName + "'";
  const originalWidth = context.measureText(testText).width;

  context.font = testSize + " '" + fontName + "', '" + testFontName + "'";
  const width = context.measureText(testText).width;

  return originalWidth !== width;
}
function isFontInstalled ( fontName ) { const testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS' ; const testText = 'mmmmmmmmmmwwwww' ; const testSize = '200px' ; var canvas = document . createElement ( 'canvas' ) ; var context = canvas . getContext ( '2d' ) ; context . font = testSize + " '" + testFontName + "'" ; const originalWidth = context . measureText ( testText ) . width ; context . font = testSize + " '" + fontName + "', '" + testFontName + "'" ; const width = context . measureText ( testText ) . width ; return originalWidth !== width ; }
eslint-disable-line 
returns whether font is installed or not.

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