|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-01-07 15:29 UTC] dimante at jmgservices dot org
-Operating System: Server 2012 R2
+Operating System: Windows Server 2012 R2
[2018-01-07 15:29 UTC] dimante at jmgservices dot org
[2018-01-07 15:31 UTC] dimante at jmgservices dot org
[2018-01-07 18:15 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2018-01-07 18:15 UTC] cmb@php.net
[2018-05-05 21:52 UTC] requinix@php.net
-Status: Feedback
+Status: No Feedback
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 08:00:01 2025 UTC |
Description: ------------ imgttftext is not rendering text on generated images. (This issue exists on the 7.1 branch as well) Test script: --------------- <?php // Set the content-type header('Content-Type: image/png'); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = '../e107_core/fonts/chaostimes.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> Expected result: ---------------- Expected the graphic to be rendered with the text Testing... Actual result: -------------- Empty image was the result.