Found 566 Articles for FabricJS

How to add stroke to Text using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 11:53:04

178 Views

In this tutorial, we are going to learn how to add stroke to Text using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. We can add stroke by using the stroke property. Syntax new fabric.Text(text: String, { stroke: String }: Object) Parameters text − This parameter accepts a String which is the ... Read More

How to add space between characters in Text using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 11:51:42

307 Views

In this tutorial, we are going to learn about how to add space between characters in a Text object using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. We can also add extra space between each character by using the charSpacing property. Syntax new fabric.Text(text: String , { charSpacing: Number }: Object) Parameters ... Read More

How to add linethrough to Text using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 11:50:20

146 Views

In this tutorial, we are going to learn about how to set the text decoration of Text object using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, font family, line height which can be obtained by the properties textAlign, fontFamily and lineHeight respectively. We can add linethrough by using the linethrough property. Syntax new fabric.Text(text: String , { linethrough: Boolean }: Object) Parameters text − This parameter accepts ... Read More

How to add line height to multiline text in Text using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 11:48:25

514 Views

In this tutorial, we are going to learn about how to add line height to multiline text in Text object using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. We can add extra height between lines by using the lineHeight property. Syntax new fabric.Text(text: String, { lineHeight: Number }: Object) Parameters text ... Read More

How to add animation in Text using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 11:47:12

628 Views

In this tutorial, we are going to learn how to add animation in Text using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. Similarly, we can also animate text by using the animate method. Syntax animate(property: String | Object, value: Number | Object) Parameters property − This property accepts a String ... Read More

How to straighten an IText object using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 10:02:14

126 Views

In this tutorial, we are going to learn about how to straighten an IText object using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText as height is ... Read More

How to shift the baseline of individual characters in IText using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 09:11:55

118 Views

In this tutorial, we are going to learn how to shift the baseline of individual characters in IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText ... Read More

How to set the vertical origin of transformation of IText using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 09:11:13

120 Views

In this tutorial, we are going to learn how to set the vertical origin of transformation of IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText ... Read More

How to set the text overline of IText using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 09:10:34

162 Views

In this tutorial, we are going to learn how to set the text overline of IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText as height ... Read More

How to set the text alignment in IText using FabricJS?

Rahul Gurung
Updated on 13-Sep-2022 08:52:11

581 Views

In this tutorial, we are going to learn how to set the text alignment of text in IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText ... Read More

Advertisements