In this article, we are going to see how to add default vertical scaling to a text canvas using FabricJS. The canvas means text written is movable, rotatable, resizable and can be stretched. But in this article, we will add default vertical scaling. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, scaleY: number);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- scaleY: It specifies the default vertical scaling.
Program: We can use FabricJS to add default vertical scaling to a canvas-like text as given below.