<canvas id="canvas" width="500" height="400" style="background-color: yellow;"></canvas>
var canvas=document.getElementById("canvas");
var cxt=canvas.getContext("2d");
cxt.font="40px 黑体";
//绘图实心字
cxt.fillStyle="red";//填充鲜红色
cxt.fillText("hello,思思博士",10,50);
//绘图空心字
cxt.strokeStyle="red";//鲜红色边
cxt.strokeText("hello,思思博士",10,100);