ID: 17192 Comment by: s0urce_code at net dot hr Reported By: hubweb at hotmail dot com Status: Closed Bug Type: GD related Operating System: Windows 2002 PHP Version: 4.2.1 Assigned To: edink New Comment:
I know I need to set the path to the fonts dir. However, this is a nuisance. Plus, it IS a bug that font isn't read correctly (or at all) from the directory specified. What about when I'll be uploading my site to some server on the web? I'd have to contact the host to ask them where they have fonts installed? That's a bit awkward, no? s0urce Previous Comments: ------------------------------------------------------------------------ [2002-05-14 20:26:11] [EMAIL PROTECTED] You need to set the path to you fonts dir. Here is a fully working example: <?php putenv('GDFONTPATH=c:\winnt\fonts'); 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, 'arial', "Testing...Omega: Ω"); imagejpeg ($im); imagedestroy ($im); ?> ------------------------------------------------------------------------ [2002-05-14 11:05:09] hubweb at hotmail dot com I tried http://ftp.proventum.net/pub/php/win32/php_gd2.zip It works fine, but I have problems with ImageTtfText(). It says me : " Warning: Could not find/open font in ... on line ... " ! ------------------------------------------------------------------------ [2002-05-14 09:18:04] [EMAIL PROTECTED] Are you sure you have copied php4ts.dll and dlls\*.dll to your windows system folder. ------------------------------------------------------------------------ [2002-05-14 04:47:55] phpbugs at ski-info-online dot com Hi, Apologies regarding the missing dll's. That was my blindness (looking in my 4.2.0 folder). I've now removed all previous installations (even though the php.ini and httpd.conf were pointing to the correct locations). However, I cannot get the curl, imap, or ldap modules to load from my extensions folder (d:\php-4.2.1-Win32\extensions). I keep getting the message I posted in my previous post. Thanks ------------------------------------------------------------------------ [2002-05-14 03:08:52] [EMAIL PROTECTED] Could you please try php_gd2.dll that I just uploaded to http://ftp.proventum.net/pub/php/win32/php_gd2.zip ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17192 -- Edit this bug report at http://bugs.php.net/?id=17192&edit=1