Canvas Tutorials

Canvas Methods and Properties

HTML canvas font Property

HTML canvas font Property



The font property is used to sets or returns the current font properties for text content on the canvas.




Its syntax is- context.font=italic bold 1re sans-serif;


Further Explanation:-


Values Description
font-style Specifies the font style. Possible values are normal, italic, oblique.
font-variant Specifies the font-variant. Possible values are normal, small-caps.
font-weight Specifies the font-weight. Possible values are normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
font-size/line-height Specifies the font size and the line height, in pixels
font-family Specifies the font family
caption Use the font captioned controls
icon Use the font used to label icons
menu Use the font used in menus
message-box Use the font used in dialog boxes
small-caption Use the font used for labeling small controls
status-bar Use the fonts used in the window status bar

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas