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.