I print text on canvas in a fairly simple way:
var ctx = canvas.getContext('2d'); ctx.font = "10pt Courier"; ctx.fillText("Hello World", 100, 100);
But how can I change the text to bold, italics, or both? Any suggestions for fixing this simple example?
javascript html5 canvas typography
Ritchie Mar 01 2018-11-11T00: 00Z
source share