ID:               39071
 User updated by:  joel at seligstein dot com
 Reported By:      joel at seligstein dot com
 Status:           Open
 Bug Type:         GD related
 Operating System: Irrelevant
 PHP Version:      5.1.6
 New Comment:

After other tests, this appears just to be the capital I letter.


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to