VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/how-to-change-the-font-of-html5-canvas-using-a-button-in-angular-js/

⇱ How to change the font of HTML5 Canvas using a button in Angular.js? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to change the font of HTML5 Canvas using a button in Angular.js?

Last Updated : 3 Jul, 2019
In this article, we are going to learn about how to change the font of HTML5 Canvas using a button in AngularJS. With the help of a click font's property can change by the user whether it is font-size or font-style. Syntax:
  • For font size (Change the font size accordingly):
    variable.fontSize = "100px"
  • For font style (Change the font style accordingly):
    variable.font = "Comic Sans MS"
Example 1: Output: Before: 👁 Image
After: 👁 Image
Example 2: Output: 👁 Image
Comment
Article Tags:

Explore