RE: [PHP] pixels per character
| From: | Chris W. Parker | Date: | Thu, 14 Apr 2005 21:21:26 +0000 |
| Subject: | RE: [PHP] pixels per character | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-213119@lists.php.net to get a copy of this message | ||
Christian Calloway <mailto:callowaylc@yahoo.com>
on Thursday, April 14, 2005 1:59 PM said:
> trying to dynamically size cell widths; what I need is a formula to
> measure pixels per character for an arbitrary font (in this case 10pt
> verdana). A simple function f(x) = strlen(x) * SOMECONSTANT just
> doesn't seem to cut it, as returned widths are to small are long. Any
> ideas?
That's like killing a mouse with an atomic bomb. Why not just do
"white-space: nowrap;" or <td nowrap="nowrap"> or set a percentage based
width?
What are you doing that requires determining the column width based on
pixels?
Chris.