Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Javascript Articles - Page 97 of 671
1K+ Views
In this tutorial, we are going to see how to change the font size of a 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. The font size specifies how large or small the characters, displayed in our Text object, should be. We can change the font size by using the fontSize property ... Read More
2K+ Views
In this tutorial, we are going to learn about how to change the font family 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, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. We can change the font family by using the fontFamily property. Syntax new fabric.Text(text: String, { fontFamily: String }: Object) Parameters text − This parameter ... Read More
800 Views
In this tutorial, we are going to learn how to center a Text vertically on canvas 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 center the text object vertically on the canvas by using the centerV method. Syntax centerV() Example 1 Default appearance of the Text object Let’s see ... Read More
1K+ Views
In this tutorial, we are going to learn how to center a Text horizontally on canvas 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 center the text object horizontally on the canvas by using the centerH method. Syntax centerH() Example 1 Default appearance of the Text object Let’s see ... Read More
420 Views
In this tutorial, we are going to learn how to center a Text horizontally and vertically on canvas 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 center the text object horizontally and vertically on the canvas by using the center method. Syntax center() Example 1 Default appearance of the ... Read More
689 Views
In this tutorial, we are going to learn how to add underline 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 overline, line height which can be obtained by the properties textAlign, overline and lineHeight respectively. Similarly we can also add underline to text by using the underline property. Syntax new fabric.Text(text: String , { underline: Boolean }: Object) Parameters text − This parameter ... Read More
283 Views
In this tutorial, we are going to learn how to add superscript with 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 also add superscripts by using the setSuperscript method. Syntax setSuperscript(start: Number, end: Number) Parameters start − This parameter accepts a Number as value. The value given determines ... Read More
277 Views
In this tutorial, we are going to learn how to add subscript with 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 also add subscripts by using the setSubscript method. Syntax setSubscript(start: Number, end: Number) Parameters start − This parameter accepts a Number as value. The value given determines ... Read More
322 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
467 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