|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-06 22:01 UTC] joel at seligstein dot com
[2006-10-06 22:05 UTC] joel at seligstein dot com
[2006-10-07 06:13 UTC] pajoye@php.net
[2006-10-15 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 00:00:01 2025 UTC |
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.