Pixel Length of text message
| From: | District Webmaster | Date: | Mon, 29 Apr 2002 16:17:17 +0000 |
| Subject: | Pixel Length of text message | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-95188@lists.php.net to get a copy of this message | ||
In html/css you can set a font size in pixels -- in my experience this
means a letter takes the same number of pixels, regardless of
resolution. With php, can I use string length and font pixel size to
determine the length of a given string on a screen? Does anyone know an
algorithm for this that works for any/every font?