HTML5 Game - Drawing text outline

Description

Drawing text outline

Demo

ResultView the demo in separate window

<!doctype html>
<html lang="en">
<body>
<div style="position: absolute; top: 50px; left: 50px;">
<canvas id="canvas" width="500" height="500">
 Your browser does not support the HTML 5 Canvas. 
</canvas>/* www.  j  av a2s .c o m*/
<script type="text/javascript">
  let theCanvas = document.getElementById('canvas');
    let context = theCanvas.getContext('2d');

           context.font = 'italic 40px sans-serif'; 
           context.strokeText("Hello!", 50, 400); 


  
</script> 

</div>
</body>
</html>

Related Topic