WeChat applet API drawing setFontSize (set font size)
setFontSize
Definition
Set the font size.
Parameters
Parameters | Type | Description |
---|---|---|
Number | Font size |
Set the font size.
Parameters | Type | Description |
---|---|---|
Number | Font size |
const ctx = wx.createCanvasContext('myCanvas') ctx.setFontSize(20) ctx.fillText('20', 20, 20) ctx.setFontSize(30) ctx.fillText('30', 40, 40) ctx.setFontSize(40) ctx.fillText('40', 60, 60) ctx.setFontSize(50) ctx.fillText('50', 90, 90) ctx.draw()