ID:               33692
 Updated by:       [EMAIL PROTECTED]
 Reported By:      a dot vent at procommerz dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Debian Linux 3.0 "Woody"
 PHP Version:      4.4.0
-Assigned To:      
+Assigned To:      pajoye
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Please use bug #33489 from now.

Provide the font Arial.ttf (btw, all windows arial work here).
http://bugs.php.net/bug.php?id=334
--Pierre


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

[2005-07-24 18:58:38] a dot vent at procommerz dot de

Well, I've tried Freetype 2.1.10 now. The result was that 
imagettftext produce an unknown function error and didn't 
work at all... 
 
The freetype compile went through perfectly as the php 
compile did, too. 
 
Maybe there's another error (e.g., in my freetype 
configuration before compiling), but these days I haven't 
got time enough to discover. For the moment, I can live 
with creating text only on 8 bit images. 
 
Best regards, 
Andreas

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

[2005-07-18 02:39:52] [EMAIL PROTECTED]

Why don't you try with Freetype 2? That might actually work..

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

[2005-07-15 11:59:33] a dot vent at procommerz dot de

Additional note: 
 
After further dealing with this issue I found that 
imagettftext works fine on 8 bit images (when using 
"imagecreate" instead of "imagecreatetruecolor"), but not 
on true color images. 
 
There is a workaround proposal published by 
"persa"
(http://www.webdeveloper.com/forum/showthread.php?threadid=30767) 
that is to create two images (one of them at 8 bit) and 
then merging them together after putting the text onto the 
8 bit image. 
 
It actually seems to be a bug, doesn't it? 
 
Best regards, 
Andreas

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

[2005-07-14 09:50:28] a dot vent at procommerz dot de

Description:
------------
The ImageTTFText function produces no result, but also no  
error. I've tried several font files (Microsoft TT core 
fonts and also from other sources), several paths (the  
same dir as the PHP script, relative to DocRoot, absolute 
path a.s.o.).  
  
It looks like not calling imagettftext - the function  
silently does nothing...  
  
I have Debian "Woody" with Apache 1.3.29 / PHP 4.4.0. The  
GD lib is the bundled one (phpinfo says: "2.0.28  
compatible"). The Freetype lib version is 1.4pre, as  
provided from Debian package manager. 
 
PHP configure options: 
 
'./configure' '--with-apxs=/var/www/bin/apxs' 
'--with-mysql' '--enable-ftp' '--enable-shared' 
'--with-iconv' '--with-gd' '--with-curl' 
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
'--with-dom=/usr' '--with-zlib' '--enable-cli'  
'--with-ttf=/usr' 
 
Output snippet from phpinfo: 
 
GD Support  
enabled  
 
GD Version  
bundled (2.0.28 compatible)  
 
FreeType Support  
enabled  
 
FreeType Linkage  
with TTF library  
 
GIF Read Support  
enabled  
 
GIF Create Support  
enabled  
 
JPG Support  
enabled  
 
PNG Support  
enabled  
 
WBMP Support  
enabled  
 
XBM Support  
enabled 

Reproduce code:
---------------
<?php
header("Content-type: image/png");
$im = imagecreatetruecolor(400, 30);
$grey = imagecolorallocate($im, 102, 102, 102);
$white = imagecolorallocate($im, 255, 255, 255);
$red = imagecolorallocate($im, 255, 0, 0);

imagefill($im, 0, 0, $grey);

$fontfile = realpath("./Arial.ttf");

imagettftext($im, 20, 0, 10, 20, $white, $fontfile, "Hello World!");

imagepng($im);
imagedestroy($im);
?>

Expected result:
----------------
Displays an image with white-colored text "Hello World" in 
Arial font face on grey background.  

Actual result:
--------------
Displays an grey-colored image without any text (empty  
grey box). No error messages. 


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


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

Reply via email to