title: How to change font family of text in JavaScript
body: <p>Here is the JS code it results in animation like handwriting, I want to change font family. I have tried a lot to change it but failed. I have added link of font family from Google and added in a head section. How can I change font family?</p>
  <pre><code>&lt;script&gt;
      var fontsize = 72;
          if (window.screen.width &gt; 700)
              fontSize=50;else if (window.screen.width &gt; 1200)
                  fontSize = 90;
              var vara = new Vara(
                  &quot;#container-animation&quot;,
                  &quot;https://raw.githubusercontent.com/akzhy/Vara/master/fonts/Satisfy/SatisfySL.json&quot;,
              [
              {
                  text : &quot;Laser&quot;,
                  y : 150,
                  fromCurrentPosition: {y:false},
                  duration:6000,
              },
              {
                  text : &quot;Lorem Ipsum&quot;,
                  y : 150,
                  fromCurrentPosition: {y:false},
                  delay:3000,
                  duration:3000
              },
              {
                  text : &quot;Whole-food, quality recipes you can easily make at home&quot;,
                  y : 150,
                  fromCurrentPosition: {y:false},
                  delay:3000,
                  duration:4500
              },
              ],
              {
                  strokeWidth: 2,
                  fontSize:fontSize,
                  color: &quot;#fff&quot;,
                  textAlign:&quot;center&quot;
              }
              );
  
          vara.ready(function(){
              var erase= true;
              vara.animationEnd(function(i, o){
                  if (i==&quot;no_erase&quot;) erase = false;
                  if(erase) {
                      o.container.style.transition = &quot;opacity 1s 1s&quot;;
                      o.container.style.opacity = 0;
                  }
              });
              })
  &lt;/script&gt;
  </code></pre>