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.
Syntax:-
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
canvas fillStyle Property in HTML
canvas strokeStyle Property in HTML
canvas shadowColor Property in HTML
canvas shadowBlur Property in HTML
canvas shadowOffsetX Property in HTML
canvas shadowOffsetY Property in HTML
canvas createLinearGradient() Method in HTML
Canvas createPattern() Method in HTML
canvas createRadialGradient() Method in HTML
canvas addColorStop() Method in HTML
HTML canvas lineCap Property
canvas stroke() Method in HTML
canvas beginPath() Method in HTML
canvas moveTo() Method in HTML
HTML canvas closePath() Method
canvas lineTo() Method in HTML
canvas clip() Method in HTML
HTML canvas quadraticCurveTo() Method
HTML canvas bezierCurveTo() Method
canvas arc() Method in HTML
HTML canvas arcTo() Method
canvas isPointInPath() Method in HTML
HTML canvas lineJoin Property
canvas lineWidth Property in HTML
canvas miterLimit Property in HTML
canvas rect() Method in HTML
HTML canvas fillRect() Method
canvas strokeRect() Method in HTML
HTML canvas clearRect() Method
canvas fill() Method in HTML
canvas scale() Method in HTML
HTML canvas rotate() Method
canvas translate() Method in HTML
canvas transform() Method in HTML
canvas setTransform() Method in HTML
canvas font Property in HTML
canvas textAlign Property in HTML
canvas textBaseline Property in HTML
canvas fillText() Method in HTML
canvas strokeText() Method in HTML
canvas measureText() Method in HTML
canvas drawImage() Method in HTML
canvas ImageData width Property in HTML
canvas ImageData height Property in HTML
canvas ImageData data Property in HTML
canvas createImageData() Method in HTML
canvas getImageData() Method in HTML
canvas putImageData() Method in HTML
canvas globalAlpha Property in HTML
canvas globalCompositeOperation Property in HTML