php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13502 ImageTTFText double-strikes text
Submitted: 2001-10-01 16:28 UTC Modified: 2002-06-28 02:57 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: holdrens at nukote dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.0.6 OS: Linux 2.4.6 - Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: holdrens at nukote dot com
New email:
PHP Version: OS:

 

 [2001-10-01 16:28 UTC] holdrens at nukote dot com
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...");





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-28 02:57 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

I can't reproduce this.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC