ID:               33404
 User updated by:  david dot perianghendra at gmail dot com
 Reported By:      david dot perianghendra at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         GD related
 Operating System: Linux
 PHP Version:      5.0.3
 Assigned To:      pajoye
 New Comment:

I have add the full path link to my ttf font file but it's still
produce the same result.


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

[2005-06-21 09:07:21] [EMAIL PROTECTED]

Please provide a link to your TTF font. But it works well here (using
windows cour.ttf or any other valid ttf).

--Pierre

------------------------------------------------------------------------

[2005-06-20 09:31:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

AFAIK, this was fixed long time ago.


------------------------------------------------------------------------

[2005-06-20 09:18:27] david dot perianghendra at gmail dot com

Description:
------------
I use PHPv5.0.3,Freetype v1.4, GD2 Library v2.0.28
I use imagettftext in my script with font file reside in the same
directory, but it seems that it doens't work though i have tried to set
'GDFONTPATH' environtment variable. The result is always the same. The
resulting image doesn't contain the text with specified TTF and no
error occured.

Reproduce code:
---------------
<?php
header("Content-type: image/png");
$im = imagecreate(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
$text = 'Bleh...';
$font = 'COUR.ttf';
putenv( 'GDFONTPATH='.realpath('.') );
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
imagejpeg()
imagepng($im);
imagedestroy($im);
?>

Expected result:
----------------
The image should contain image with text written on it with specified
TTF.

Actual result:
--------------
Image without the text with specified TTF.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33404&edit=1

Reply via email to