Re: [PHP] Why is imageTTFtext function useless?(again)
Your problem doesn't have anything to do with PHP. The error says that libgd doesn't offer freetype support, so you need to get a more current version of gd. Regards, Jim Heffner No idea, check your config.log and see why it is failing. On Thu, 25 Apr 2002, zhaoxd wrote: Whatever I tried ,it is also useless,why? This time I compile it with freetype-1.3.1.when I used the test code , it also said libgd was not built with FreeType font support in /usr/local/apache/htdocs/test.php on line 14. Would you mind tell me how you do this? I just wanna support FreeType font in my gd so as to use gd function like ImageTTFText ,etc. Thank you zhaoxd It works fine. Spell Header() right, or remove the header altogether so you can see the error message. I predict you will see a message telling you it couldn't open the font file. -Rasmus On Thu, 25 Apr 2002, zhaoxd wrote: hello,all: I have already installed gd-1.8.4 in php-4.1.2 with some libraries,such as libpng -1.2.0,freetype-1.3,zlib-1.1.4,freetype2,in my apache server which version is 1.3.24,and phpinfo() display php can support such soft,as follow: GD Support---enabled GD Version---1.6.2 or higher FreeType Support-enabled FreeType Linkage-with freetype JPG Support--enabled PNG Support--enabled WBMP Support-enabled But when I used the function related with ttf,like ImageTTFText or ImageTTFBox,I found it useless,in other words,no pictures were displayed in my IE. I don't understand why,is gd-1.8.4 can not support these functions? ps:my test code ? //define the type of inputting picture; Heder(content-type:image/png); //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? Can anybody give a reply? Thank you zhaoxd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why is imageTTFtext function useless?
hello,all: I have already installed gd-1.8.4 in php-4.1.2 with some libraries,such as libpng -1.2.0,freetype-1.3,zlib-1.1.4,freetype2,in my apache server which version is 1.3.24,and phpinfo() display php can support such soft,as follow: GD Support---enabled GD Version---1.6.2 or higher FreeType Support-enabled FreeType Linkage-with freetype JPG Support--enabled PNG Support--enabled WBMP Support-enabled But when I used the function related with ttf,like ImageTTFText or ImageTTFBox,I found it useless,in other words,no pictures were displayed in my IE. I don't understand why,is gd-1.8.4 can not support these functions? ps:my test code ? //define the type of inputting picture; Heder(content-type:image/png); //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? Can anybody give a reply? Thank you zhaoxd
Re: [PHP] Why is imageTTFtext function useless?
On Thursday 25 April 2002 10:08, zhaoxd wrote: ? //define the type of inputting picture; Heder(content-type:image/png); Is this a typo? Should be Header(...). //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0 xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? I tried this and it works. However the font I used didn't have those chr(0xE8), etc defined so I can only see www.ccidnet.com. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You are only young once, but you can stay immature indefinitely. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why is imageTTFtext function useless?
It works fine. Spell Header() right, or remove the header altogether so you can see the error message. I predict you will see a message telling you it couldn't open the font file. -Rasmus On Thu, 25 Apr 2002, zhaoxd wrote: hello,all: I have already installed gd-1.8.4 in php-4.1.2 with some libraries,such as libpng -1.2.0,freetype-1.3,zlib-1.1.4,freetype2,in my apache server which version is 1.3.24,and phpinfo() display php can support such soft,as follow: GD Support---enabled GD Version---1.6.2 or higher FreeType Support-enabled FreeType Linkage-with freetype JPG Support--enabled PNG Support--enabled WBMP Support-enabled But when I used the function related with ttf,like ImageTTFText or ImageTTFBox,I found it useless,in other words,no pictures were displayed in my IE. I don't understand why,is gd-1.8.4 can not support these functions? ps:my test code ? //define the type of inputting picture; Heder(content-type:image/png); //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? Can anybody give a reply? Thank you zhaoxd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why is imageTTFtext function useless?
? //define the type of inputting picture; Heder(content-type:image/png); Is this a typo? Should be Header(...). Sorry, I did a wrong copy.But when I cut this line,it output a warning words: libgd was not built with FreeType font support in /usr/local/apache/htdocs/test.php on line 14, I guess my compiling is not right,when I installed the php,my parameter of configuration is ./configure --with-mysql=/usr/local/mysql --with-apache=../apache-1.3.24 --enable-track-vars --with-gd=../gd-1.8.4 --with-imap=../imap-4.7c --enable-ftp --with-ldap=/usr/local/ldap --with-zlib-dir=../zlib --with-png-dir=../libpng --with-freetype-dir=../freetype2.1.0 --with-ttf=/usr/local/lib Did I use freetype2.1.0 right? Maybe I shall try freetype-1.3. right? //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0 xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? I tried this and it works. I can only see www.ccidnet.com. Thank you, zhaoxd
Re: [PHP] Why is imageTTFtext function useless?(again)
Whatever I tried ,it is also useless,why? This time I compile it with freetype-1.3.1.when I used the test code , it also said libgd was not built with FreeType font support in /usr/local/apache/htdocs/test.php on line 14. Would you mind tell me how you do this? I just wanna support FreeType font in my gd so as to use gd function like ImageTTFText ,etc. Thank you zhaoxd It works fine. Spell Header() right, or remove the header altogether so you can see the error message. I predict you will see a message telling you it couldn't open the font file. -Rasmus On Thu, 25 Apr 2002, zhaoxd wrote: hello,all: I have already installed gd-1.8.4 in php-4.1.2 with some libraries,such as libpng -1.2.0,freetype-1.3,zlib-1.1.4,freetype2,in my apache server which version is 1.3.24,and phpinfo() display php can support such soft,as follow: GD Support---enabled GD Version---1.6.2 or higher FreeType Support-enabled FreeType Linkage-with freetype JPG Support--enabled PNG Support--enabled WBMP Support-enabled But when I used the function related with ttf,like ImageTTFText or ImageTTFBox,I found it useless,in other words,no pictures were displayed in my IE. I don't understand why,is gd-1.8.4 can not support these functions? ps:my test code ? //define the type of inputting picture; Heder(content-type:image/png); //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? Can anybody give a reply? Thank you zhaoxd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why is imageTTFtext function useless?(again)
No idea, check your config.log and see why it is failing. On Thu, 25 Apr 2002, zhaoxd wrote: Whatever I tried ,it is also useless,why? This time I compile it with freetype-1.3.1.when I used the test code , it also said libgd was not built with FreeType font support in /usr/local/apache/htdocs/test.php on line 14. Would you mind tell me how you do this? I just wanna support FreeType font in my gd so as to use gd function like ImageTTFText ,etc. Thank you zhaoxd It works fine. Spell Header() right, or remove the header altogether so you can see the error message. I predict you will see a message telling you it couldn't open the font file. -Rasmus On Thu, 25 Apr 2002, zhaoxd wrote: hello,all: I have already installed gd-1.8.4 in php-4.1.2 with some libraries,such as libpng -1.2.0,freetype-1.3,zlib-1.1.4,freetype2,in my apache server which version is 1.3.24,and phpinfo() display php can support such soft,as follow: GD Support---enabled GD Version---1.6.2 or higher FreeType Support-enabled FreeType Linkage-with freetype JPG Support--enabled PNG Support--enabled WBMP Support-enabled But when I used the function related with ttf,like ImageTTFText or ImageTTFBox,I found it useless,in other words,no pictures were displayed in my IE. I don't understand why,is gd-1.8.4 can not support these functions? ps:my test code ? //define the type of inputting picture; Heder(content-type:image/png); //create picture $pic=imagecreate(240,30); //define color $black=imagecolorallocate($pic,0,0,0); $white=imagecolorallocate($pic,255,255,255); //define font copied from windows2000 $font=fonts/simhei.ttf; //define characters to output $str = chr(0xE8).chr(0xB5).chr(0x9B).chr(0xE8).chr(0xBF).chr(0xAA).chr(0xE7).chr(0xBD).chr(0 x91). www.ccidnet.com; //write ttf in picture imageTTFText($pic,20,0,10,20,$white,$font,$str); //create png picture imagepng($pic); //release the memory occupied by the picture imagedestroy($pic); ? Can anybody give a reply? Thank you zhaoxd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php