Text can be rendered in a canvas using the fillText() method and font property can be set for styling purpose.
The style available for font are normal, italic, or bold. By default font type is normal.
fillStyle property can be used to the font color in a cavas.
strokeText() method can be used to create a text stroke and to set the color of that
stroke strokeStyle property of canvas context is used.
To align a text horizontally with respect to a virtual vertical line at the point we created the text
textAlign propertty can be used. Different values that can be assigned to this property
are start, end, left,
center or right.
To align a text vertically with respect to a virtual horizontal line at the point we created the text
textBaseline propertty can be used. Different values that can be assigned to this property
are top, middle, bottom,
alphabetic, hanging, or ideographic.