Page 1 of 1
Freetype Install
Posted: Thu Jan 16, 2003 9:44 pm
by sane993
Hello. Just installed php 4.3.0 yesterday. And changed the php.ini file to allow gd image support. The images are fine. Except when I go to use fonts nothing happens. I believe I need the freetype library. Which one should I download and how do I install it? Any tutorials you can point in the direction of?
Thanks
-Sane993
Posted: Fri Jan 17, 2003 2:17 am
by twigletmac
If you are on Windows then the gd.dll has the freetype libraries included. Have you made sure that you specify the correct path to the font that you wish to use?
Mac
Posted: Fri Jan 17, 2003 3:23 am
by sane993
Code: Select all
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "C:/WINDOWS/Fonts/times.ttf", $text);
Posted: Fri Jan 17, 2003 3:25 am
by twigletmac
Have you tried putting a copy of the font into your web directory and seeing if that works?
Mac
Posted: Fri Jan 17, 2003 3:37 am
by sane993
Code: Select all
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "times.ttf", $text);
copied and pasted the times.ttf file into the same directory as the code and no difference in the output.
Posted: Fri Jan 17, 2003 3:41 am
by sane993
Just fiddled with the code and it worked. Thanks for you help.
