Re: GD & Fonts
| From: | James | Date: | Fri, 09 May 2003 10:57:54 +0000 |
| Subject: | Re: GD & Fonts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146989@lists.php.net to get a copy of this message | ||
imagettftext($im, 20, 0, 10, 20, $black, "/path/arial.ttf", "Testing...
Omega: Ω");
Put your path into the call, making sure it is from the root of the web
server.
"Chris Blake" <cblake@pbpc.co.za> wrote in message
news:1052476723.2179.170.camel@pb004.pbpc.co.za...
> Greetings learned PHP(eople),
>
> I`ve trawled around on the archives using "gd2" as search criteria, and
> couldn`t find anything specific to finding out what version of gd I have
> installed.
>
> I also enquired on the Mandrake list about the location of the fonts
> directory, still no answer returned.
>
> Trying to create a png file, I need to state where the font directory i
> located.
> I have made a folder called fonts in the directory where my php file
> resides, and referenced it using the following
> ----------------------------------------
> //Let GD2 know where fonts reside
> putenv('GDFONTPATH = fonts');
> $fontname = 'beast_wars.ttf';
> -----------------------------------------
> ....but it fails with
>
> Warning: Could not find/open font in
> /home/data/ClientWebs/chrisplay/Generic/make_buttons.php on line 38
>
> Warning: Could not find/open font in
> /home/data/ClientWebs/chrisplay/Generic/make_buttons.php on line 71
>
> Warning: Cannot add header information - headers already sent by (output
> started at /home/data/ClientWebs/chrisplay/Generic/make_buttons.php:1)
> in /home/data/ClientWebs/chrisplay/Generic/make_buttons.php on line 73
>
> .....and proceeds to fill up my page with all manner of weird
> characters.
>
> Lines 38, 71 and 73 obviously won`t run in view of the fact that it
> can`t pick up the font.
>
> Some pointers would be appreciated as to where to start looking on the
> archives.....www.boutell.com/gd leads me to think I must download and
> install gd2, but is that neccessary ?
>
> --
> Chris Blake
> Office : (011) 782-0840
> Cell : 083 985 0379
> "Remember, Information is not knowledge; Knowledge is not Wisdom;
> Wisdom is not truth; Truth is not beauty; Beauty is not love;
> Love is not music; Music is the best." -- Frank Zappa
>