Telling GD2 Where Fonts Are

From: Stiano_at_Optonline.Net (stiano_at_optonline.net)
Date: 11/28/03


To: php-general@lists.php.net
Date: Thu, 27 Nov 2003 21:12:57 -0500

Working on a Macintosh G3 PowerBook running OS 10.2 and PHP 4.3.0 with GD2
...

I'm having trouble telling GD2 where the font I'm using in a PHP exercise
(Chapter 19 of the 2nd edition of the Welling/Thomson book), arial.ttf,
resides. The font is obviously in a folder on my hard drive, the path of
which runs like so:

Macintosh HD/Fonts/arial.ttf

The line of PHP code that gives this info goes like this--at least the way
I unsuccessfully put it:

putenv('GDFONTPATH=Macintosh HD/Fonts
$fontname = 'arial.ttf'

As I say, it doesn't work. Can anyone tell me how I should alter the code?
Should I put the font in the root folder, 'localhost/..."?

Thank you.

Steve Tiano

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



Relevant Pages