Does function ImageTTFText work with php 4.1.2 and freetype 2.0.5?
| From: | Ziying Sherwin | Date: | Mon, 04 Mar 2002 22:01:20 +0000 |
| Subject: | Does function ImageTTFText work with php 4.1.2 and freetype 2.0.5? | ||
| Groups: | php.dev php.general | ||
| Request: | Send a blank email to php-dev+get-80710@lists.php.net to get a copy of this message | ||
We installed php 4.1.2 with freetype 2.0.5 library support on our Solaris
2.8 machine using gcc 2.95.2. However, the php function ImageTTFText()
stopped to work properly with the new installation.
We used the following sample code from php web site for testing:
<?php
Header("Content-type: image/jpeg");
$im = @imagecreate (400, 30);
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
ImageTTFText ($im, 20, 0, 10, 20, $white,
"/usr/openwin/lib/X11/fonts/TrueType/TimesNewRoman.ttf", "Testing... Omega:
Ω");
echo "<html> <title>TTF result</title><center> <body
bgcolor=\"white\"></center><hr> ";
echo "<P><IMG SRC=\"".ImageJPEG($im)."\"> ";
ImageDestroy ($im);
?>
But there is no text generated in the image. When we tried to use cyberbit
fonts to generate a UTF-8 string, we kept getting the warning message and
no image file is generated.
The same code works with php 4.0.1 and freetype 1.3.1 library. So is it a
problem with php 4.1.1 and freetype 2 library? Is there anyone who successfully used php 4.1.2 with
freetype 2 library?
I am not on the mailing list, please send emails to sherwin@nlm.nih.gov.
Thanks,
Ziying Sherwin