You can set a number of font properties by using context.font: style, weight, size, and face.
These are based on Cascading Style Sheet (CSS) specifications.
Not all values are required.
If values aren't specified, the defaults are applied.
The format of the statement to assign font attributes is
context.font = "style weight size face";
For example:
context.font = "italic bold 20px arial";
Styles available include:
Weights available include
Font sizes can be specified in:
Font faces, or type faces, give text their individual appearance.
The font faces supported depend on the browser displaying the web page.
We can specify a font family name for the font face: sans-serif, serif, or monospace.
To specify an individual font name, some choices that are generally supported by browsers are