|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-07-30 06:44 UTC] spam at jerome-gamez dot de
Description: ------------ This script below does not lead to an image with some text on it, but to a set of chars, as you can see on http://drupal.smallbrainer.de/font.php We are using PHP 4.3.2, see our phpinfo: http://www.smallbrainer.de/phpinfo.php Reproduce code: --------------- <?php // header("Content-type: image/jpeg"); $im = imagecreate(400,30); $white = imagecolorallocate($im, 255,255,255); $black = imagecolorallocate($im, 0,0,0); // Replace path by your own font path // imagettftext($im, 20, 0, 10, 20, $black, "/var/www/web1/html/sb-drupal/fonts/slkscr.ttf", "Testing... Omega: &#937;"); imagejpeg($im); imagedestroy($im); ?> Expected result: ---------------- An image with some text on it. Actual result: -------------- Result is visible at http://drupal.smallbrainer.de/font.php. - A set of chars, but not an image PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 15:00:01 2025 UTC |
I have just forgotten to delete the comments... It does not work in both versions. This one does not work, too. <?php header("Content-type: image/jpeg"); $im = imagecreate(400,30); $white = imagecolorallocate($im, 255,255,255); $black = imagecolorallocate($im, 0,0,0); // Replace path by your own font path imagettftext($im, 20, 0, 10, 20, $black, "/var/www/web1/html/sb-drupal/fonts/slkscr.ttf", "Testing... Omega: &#937;"); imagejpeg($im); imagedestroy($im); ?> Greetings - J?r?me