Re: [PHP] GD - Problem writing text
On Thu, November 23, 2006 9:30 am, Fredrik Thunberg wrote: imagettftext ($im, 30, 0, 10, 40 , $black, TTF_DIR. times.ttf, Hello World!); FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.1.3 The one things that differs between the servers is: FreeType Linkagewith TTF library is set on the faulty one. Can this be the problem? It sure seems suspicious to me. Not that I can ever keep straight all those different font packages, but maybe you need that other other TTF library font format instead of times.ttf to be installed on the non-working machine... The only other thing would be to double-check that PHP actually can find and read the full path to your times.ttf file, to be SURE it's not paths/permissions getting you. Oh. Also try to compare any FreeType configuration files on both machines. I seem to recall there was some kind of config file... No, that was the pdflib.upr file I was thinking of... Still, any kind of test/configuration check you can run on the font installations may help. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD - Problem writing text
Hi all This is my first attempt to wrie to this mailing list, so please bare with me. My problem is as follows I'm trying to generate a dynamic picture with some text on it. The code works fine on one of my servers, but not on the other one. The code I'm using: $im = imagecreatetruecolor (400, 100); $black = imagecolorallocate ($im, 0, 0, 0 ); $white = imagecolorallocate ($im, 255, 255, 255 ); imagerectangle ($im,0, 0,399,99 ,$black); imagefilledrectangle ($im,0, 0,399,99 ,$white); imagettftext ($im, 30, 0, 10, 40 , $black, TTF_DIR. times.ttf, Hello World!); header (Content-type: image/png ); imagepng ($im); Where TTF_DIR is the complete path to the times.ttf-file (which i've chmodded to 777). This is the gd-info from where it works: GD Support enabled GD Version bundled (2.0.28 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.1.3 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled The one things that differs between the servers is: FreeType Linkagewith TTF library is set on the faulty one. Can this be the problem? Cheers /Fredrik Thunberg [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php