How to add overline to a text canvas using Fabric.js ?
In this article, we are going to see how to add overline text-decoration to a canvas-like text using FabricJS. The canvas means text written is movable, rotatable, resizable and can be stretched. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, overline: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- overline: It specifies whether to enable overline text decoration.
Program: We can use FabricJS to set the add overline to a canvas-like text as given below.