Re: [PHP] true type fonts again
On Monday 15 December 2003 13:26, cj wrote: I have been able to the the image to display, which is a gif image of a rectange. But the text doesn't get displayed on the image. There are no error messages on the screen The other messages entitled true type fonts is a thread I started as well, but the image was not being displayed on the screen at all. So now I have the image but no text on the image. What could be causing this, and what should I have a look at? If you had read and followed the advice given in response to your earlier posts I'm sure you would've solved your problem by now. Again: 1) Enable FULL error reporting by including these lines at the top of your code: error_reporting (E_ALL); ini_set('display_errors', 1); 2) Output the image to file. Remember to comment out the header() for the time being. 3) And someone else suggested that you may have specified the name of your font file incorrectly. In my experience you *have* to specify a path to your font file. So if the font file was in the same directory as your script then use './name_of_font_file'. So if you had followed the above steps (at the least step 1) you would have seen the following error: PHP Warning: imagettftext(): Could not find/open font in ... and would have clued you into what the problem was. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Alone, adj.: In bad company. -- Ambrose Bierce, The Devil's Dictionary */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] true type fonts again
I included the error_reporting (E_ALL); ini_set('display_errors', 1); and commented out the header information, and I got the cannot open/find font So I copied the font to the correct places where I thought the font should go, and tried the web page again. The image is displayed but no text, I will be looking through the web pages for a way to output the image to harddrive directly. would running php script.php filename.gif be suitable, or is there another method. I do appreciate your help Thanks CJ -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Monday, 15 December 2003 7:22 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] true type fonts again On Monday 15 December 2003 13:26, cj wrote: I have been able to the the image to display, which is a gif image of a rectange. But the text doesn't get displayed on the image. There are no error messages on the screen The other messages entitled true type fonts is a thread I started as well, but the image was not being displayed on the screen at all. So now I have the image but no text on the image. What could be causing this, and what should I have a look at? If you had read and followed the advice given in response to your earlier posts I'm sure you would've solved your problem by now. Again: 1) Enable FULL error reporting by including these lines at the top of your code: error_reporting (E_ALL); ini_set('display_errors', 1); 2) Output the image to file. Remember to comment out the header() for the time being. 3) And someone else suggested that you may have specified the name of your font file incorrectly. In my experience you *have* to specify a path to your font file. So if the font file was in the same directory as your script then use './name_of_font_file'. So if you had followed the above steps (at the least step 1) you would have seen the following error: PHP Warning: imagettftext(): Could not find/open font in ... and would have clued you into what the problem was. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Alone, adj.: In bad company. -- Ambrose Bierce, The Devil's Dictionary */ -- 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] true type fonts again
G'day all I have been able to the the image to display, which is a gif image of a rectange. But the text doesn't get displayed on the image. There are no error messages on the screen The other messages entitled true type fonts is a thread I started as well, but the image was not being displayed on the screen at all. So now I have the image but no text on the image. What could be causing this, and what should I have a look at? Thanks P.S: the code I use is below ?php header(Content-type: image/gif); $im = imagecreate(400,30); $white = imagecolorallocate($im, 202,112,112); $black = imagecolorallocate($im, 255,255,255); // Replace path by your own font path imagettftext($im, 20, 0, 10, 20, $black, arial, Testing... Omega: amp;#937;); imagegif($im); imagedestroy($im); ? The Glennies Group P.O. Box 5136 Studfield Post Office WANTIRNA SOUTH VIC 3152 Ph: 61 3 9800 3906 E-mail: [EMAIL PROTECTED] Website: glennies.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] true type fonts
i am creating images using true type fonts. i have uploaded all my fonts into one directory on the server(/fonts) some fonts like arial.ttf work. however other show up as boxes. they are beautiful but not quit the desired effect. what is the problem any idea? it cant be a scriptproblem can it? it has to be the files or maybe server set up? i have done this before with no problem so i am stumped at what the difference here is and why some work. idea? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0
Re: [PHP] true type fonts
Many special fonts don't have all the characters besides letters and numbers. Perhaps thats the problem? - Original Message - From: Jon Yaggie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:11 PM Subject: [PHP] true type fonts i am creating images using true type fonts. i have uploaded all my fonts into one directory on the server(/fonts) some fonts like arial.ttf work. however other show up as boxes. they are beautiful but not quit the desired effect. what is the problem any idea? it cant be a scriptproblem can it? it has to be the files or maybe server set up? i have done this before with no problem so i am stumped at what the difference here is and why some work. idea? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] true type fonts
nope. the fonts are normalenough when i i open them. and in fact i guess i get slight different boxes for different fonts. but all of them are alpha-numeric fonts Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0 - Original Message - From: Chris Anderson [EMAIL PROTECTED] To: Jon Yaggie [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 17, 2001 2:02 AM Subject: Re: [PHP] true type fonts Many special fonts don't have all the characters besides letters and numbers. Perhaps thats the problem? - Original Message - From: Jon Yaggie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:11 PM Subject: [PHP] true type fonts i am creating images using true type fonts. i have uploaded all my fonts into one directory on the server(/fonts) some fonts like arial.ttf work. however other show up as boxes. they are beautiful but not quit the desired effect. what is the problem any idea? it cant be a scriptproblem can it? it has to be the files or maybe server set up? i have done this before with no problem so i am stumped at what the difference here is and why some work. idea? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]