【发布时间】:2015-07-03 07:02:02
【问题描述】:
我有这段代码可以在我的 HTML 画布上绘制一些文本:
$("#canvastext").keyup(function(){
ctx.lineWidth = 8;
ctx.font = '20pt Arial';
ctx.strokeStyle = 'black';
ctx.fillStyle = 'white';
ctx.textAlign = 'center';
var text = document.getElementById('canvastext').value;
text = text.toUpperCase();
x = canvas.width/2;
y = canvas.height - canvas.height/4.5;
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.strokeText(text, x, y);
ctx.fillText(text, x, y);
});
但是为什么有些字符有这种奇怪的形状:
为什么A、M,V、W的笔划线很丑?
【问题讨论】:
-
fiddle会很有帮助!
标签: javascript jquery html canvas