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.
加载中,请稍侯......
精彩评论