开发者

HTML Canvas is rendering text slightly differently accross browsers

开发者 https://www.devze.com 2023-02-09 09:10 出处:网络
I\'m developing a web application that heavily relies upon knowing the exact x and y location of each text character on the canvas. The problem is that different browsers aren\'t rendering each charac

I'm developing a web application that heavily relies upon knowing the exact x and y location of each text character on the canvas. The problem is that different browsers aren't rendering each character to the same scale.

The font I am using is Courier New, I have tested in Chrome 9, FF4 beta and Chrome 9 beta.

I would like to know if there is anything that can be done. Also, is it due to how the browser itself handles text or pur开发者_如何学JAVAely the canvas API?


I remember this article about it interoperability tests between different browsers. The handling of fonts is different in each browsers. There are differences with CSS too and weight or rotation in transform. I do not think you will be able to achieve perfect rendering in each of them

0

精彩评论

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