Ron Croonenberg wrote on 19 dec 2007 in comp.lang.javascript
:
is there a function that I can feed a string and returns the number of
pixels it is going to use to be displayed ?
No, because that depends on the font-family, the font-size, the font
weight, etc. and the browser implementation of that and the user override
settings.
You could measuer it programmaticly AFTER it is displayed.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)