astralaaron Posted October 22, 2013 Share Posted October 22, 2013 Is there any reason why 14px text in the document and 14px text in a Canvas element are different? The canvas text is bigger.. Link to comment Share on other sites More sharing options...
Ingolme Posted October 22, 2013 Share Posted October 22, 2013 Are you using the same font? Link to comment Share on other sites More sharing options...
astralaaron Posted October 22, 2013 Author Share Posted October 22, 2013 yes same font Link to comment Share on other sites More sharing options...
astralaaron Posted October 22, 2013 Author Share Posted October 22, 2013 it is pretty close anyway...but definitely a little different Link to comment Share on other sites More sharing options...
Ingolme Posted October 22, 2013 Share Posted October 22, 2013 Hmm, I can't say why they're different but I generally don't rely on font sizes being the same in different devices. Perhaps absolute units such as cm or pt would give a more accurate representation. Yes, px is considered a relative unit by the W3C because it depends on the real size of a pixel which is different for every screen though that should mean that 14px should be the same for any application on the same screen. cm isn't very reliable either, I tried to make a box 1cm big and it's actually exactly 9 millimeters so there's a systematic error of 10% on my device. I really don't know what to trust, perhaps checking sizes in a PDF document is a good way to calibrate a computer. Link to comment Share on other sites More sharing options...
astralaaron Posted October 22, 2013 Author Share Posted October 22, 2013 Thanks for the info. It's close enough anyway. By the way I forgot to mention, the canvas (marquee with the text) shows in IE9 / IE10, and a marquee element shows in IE7 / IE8. Maybe IE7 / IE8 render px differently Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now