I just upgraded to php4.0.4pl1( so I could use zend optimizer) with
t1lib.so.1, and I'm having some problems with t1lib work consistently.
What is happening is when I try to center certain text on a card size
image with a variable x coordinate, imagepstext will act as if $x =0. I
checked to see if my function was returning the correct number and it
is. This script has worked great with php3.0.12, and I even reinstalled
it to see if it still worked, and it did.
Here are the snippets from the script:
function getx($string,$font,$size){
$bbox = imagepsbbox($string, $font, $size);
$width = $bbox[2] - $bbox[0];
$x = 252 - ceil($width/2);
return $x;
}
$x = getx($name,$font1,18);
imagepstext($im, "$name", $font1, 18, $black, $white, $x, 45);
IF (for example)
$name = "Registered Representative" it will not center it (acts like
x=0, left justified)
$name = "Registered Representativ" it will not center it (acts like x=0,
left justified)
$name = "Registered Representati" it will center
$name = "Registered Repre5entative" it will center (char "5" can be any
letter but "s")
Any ideas? I would hate to have to go back to using ttf again.
Thanks,
JR
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]