title: How to use Google Fonts to manipulate text on a fabricjs canvas?
body: <p>I'd like to be able to designated a few google fonts as buttons to change text on a canvas. I was able to write something to change between a few basic fonts but after a few hours tinkering with Google Fonts haven't been able to get it to work.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>canvas = new fabric.Canvas('c');
  var text = new fabric.Text("Some Text", {
    fontFamily: 'helvetica neue',
    fill: '#000',
    fontSize: 60
  });
  canvas.add(text);
  
  document.getElementById('times').addEventListener('click', function(e) {
    canvas.getActiveObject().set("fontFamily", "times");
    canvas.renderAll();
  });
  
  document.getElementById('tangerine').addEventListener('click', function(e) {
    canvas.getActiveObject().set("fontFamily", "tangerine");
    canvas.renderAll();
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>canvas {
    border: 1px solid #dddddd;
    border-radius: 4px;
    margin: 10px 0px 0px 12px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://rawgit.com/kangax/fabric.js/master/dist/fabric.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://fonts.googleapis.com/css?family=Tangerine" rel="stylesheet"&gt;&lt;/script&gt;
  
  &lt;canvas id="c" width="400" height="400"&gt;&lt;/canvas&gt;
  &lt;br&gt;
  &lt;button id="times"&gt;Times&lt;/button&gt;
  &lt;button id="tangerine"&gt;Tangerine&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>