In this article, we are going to see how to change the font size of a text canvas using FabricJS. The text canvas means text written is movable and can be stretched according to requirement. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, fontSize: number);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- fontSize: It specifies the font size.
Program: This example uses FabricJS to change font size of the text canvas.
- How to change font-family of a text canvas using Fabric.js ?
- How to change the font style of a text canvas using Fabric.js ?
- How to change font-weight of a canvas-type text using Fabric.js ?
- How to change the font of HTML5 Canvas using a button in Angular.js?
- How to change font size depending on width of container?
- How to change character spacing of text canvas using Fabric.js ?
- How to change border-color of a canvas text using Fabric.js ?
- How to change corner style of a canvas-type text using Fabric.js ?
- How to change background color of canvas-type text using Fabric.js ?
- HTML | canvas font Property
- How to change the font-color of disabled input using CSS ?
- CSS | font-size Property
- CSS | font-size-adjust Property
- HTML | <font> size Attribute
- How to change background color of a canvas circle using Fabric.js ?
- How to change selection background color of a canvas circle using Fabric.js ?
- How to add overline to a text canvas using Fabric.js ?
- How to Create Text on Canvas using Fabric.js ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.