On Tuesday 30 April 2002 00:17, District Webmaster wrote:
> 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. 

That may (or may not) be true, but that's referring to the height of the font.

> 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?

Here I would assume you're referring to the width of the text. Thus what you 
want to do is not possible.

You can use a fixed-width font and hope for the best.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If the very old will remember, the very young will listen.
                -- Chief Dan George
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to