Bug #13502: ImageTTFText double-strikes text
| From: | holdrens at nukote dot com | Date: | Mon, 01 Oct 2001 20:28:06 +0000 |
| Subject: | Bug #13502: ImageTTFText double-strikes text | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-66957@lists.php.net to get a copy of this message | ||
From: holdrens@nukote.com
Operating system: Linux 2.4.6 - Debian
PHP version: 4.0.6
PHP Bug Type: *Graphics related
Bug description: ImageTTFText double-strikes text
When I specify an absolute path to a font with ImageTTFText, such as
"$DOCUMENT_ROOT/fonts/verdana.ttf", it displays the text twice on top of
itself, but slightly misaligned to produce a blurring effect. I get this
effect with all truetype fonts. ImagePSText does not exhibit this
behavior.
When I specify the font using a relative path, like
"../../../../$DOCUMENT_ROOT/fonts/verdana.ttf", it displays fine.
Here's an example of what causes the problem:
$im = ImageCreate(100,100);
$white = ImageColorAllocate ($im, 0xFF, 0xFF, 0xFF);
$b $black = ImageColorAllocate ($im, 0x00, 0x00, 0x00);
ImageTTFText($im,16,0,0,50,$black,
"$DOCUMENT_ROOT/fonts/verdana.ttf","Testing...");
Header("Content-type: image/png");
ImagePNG($im);
ImageDestroy($im);
And here's what makes the problem go away:
ImageTTFText($im,16,0,0,50,$black,
"../../../../$DOCUMENT_ROOT/fonts/verdana.ttf",
"Testing...");
--
Edit bug report at: http://bugs.php.net/?id=13502&edit=1