开发者

html5 canvas - How do I determine the width of a character?

I'm using .fillText with fixe开发者_如何学编程d width font. I can set the height of the font by setting .font. but how can I determine the resulting width of a character?


Try measureText("a") where a is the character you wish to measure. For fixed width font, it should all be the same.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜