title: How to justify align text in html5 canvas?
body: <p>How can I align text within a html5 canvas to justify"? In the code below, text can be left/right/center aligned. I need to set <code>align="justify"</code>. Please suggest how can this be done?</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;body onload="callMe()"&gt;
      &lt;canvas id="MyCanvas"&gt;&lt;/canvas&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>function callMe() {
      var canvas = document.getElementById("MyCanvas");
      var ctx = canvas.getContext("2d");
      var txt = "Welcome to the new hello world example";
      cxt.font = "10pt Arial";
      cxt.textAlign = "left";
  
      /* code to text wrap*/
      cxt.fillText(txt, 10, 20);
  }
  </code></pre>