code: 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;
  }
docs: eslint-disable-line 
  returns whether font is installed or not.
  
  @param {String} fontName
  @return {Boolean}