ID: 39071
Updated by: [EMAIL PROTECTED]
Reported By: joel at seligstein dot com
-Status: Open
+Status: Feedback
Bug Type: GD related
Operating System: Irrelevant
PHP Version: 5.1.6
-Assigned To:
+Assigned To: pajoye
New Comment:
Please provide a link to the TTF file. Which freetype version do you
use?
Previous Comments:
------------------------------------------------------------------------
[2006-10-06 22:05:10] joel at seligstein dot com
I'm going to keep changing my mind, here. The J obviously is missing a
pixel as well. It appears some or all of the letters are mixing a
pixel.
------------------------------------------------------------------------
[2006-10-06 22:01:26] joel at seligstein dot com
After other tests, this appears just to be the capital I letter.
------------------------------------------------------------------------
[2006-10-06 21:43:26] joel at seligstein dot com
Description:
------------
Using text anywhere on an image using a local font (copy of
Verdana.TTF), imagettffont cuts off the first pixel. This is easily
evident in the capital letter I.
gd_info():
array(12) {
["GD Version"]=>
string(27) "bundled (2.0.28 compatible)"
["FreeType Support"]=>
bool(true)
["FreeType Linkage"]=>
string(13) "with freetype"
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPG Support"]=>
bool(true)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(false)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}
Reproduce code:
---------------
header( "Content-type: image/png" );
$i = imagecreate(100,100);
$white = imagecolorallocate($i,255,255,255);
$black = imagecolorallocate($i,0,0,0);
imagefill( $i, 0,0,$white);
imagettftext( $i, 10, 0, 30, 30, $black, "/path/to/Verdana.TTF", "I am
testing" );
imagepng($i);
And you will see the letter I has the first pixel cut off.
Expected result:
----------------
I'd expect full letters, not missing the first pixel.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39071&edit=1