From:             [EMAIL PROTECTED]
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


-- 
PHP Development 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]

Reply via email to