Page 1 of 1
Difffernt fonts in GD library images
Posted: Thu Aug 21, 2003 10:55 am
by DaiWelsh
I am creating dynamic images with PHP on a host's Solaris box. I would like to use fonts other than the standard (ugly) ones available through the GD library.
Firstly am I right in thinking I can get hold of BDF font files, uplaod them into my web space and then load them through GD calls in PHP?
Secondly does anyone have any good sources for some BDF files for 'common' fonts?
TIA,
Dai
Posted: Sun Aug 31, 2003 6:24 pm
by JAM
Perhaps
this link might help.
Laborate with imagettftext() and you might have something going...
Posted: Mon Sep 01, 2003 6:01 am
by pootergeist
what's a bdf font?
GD can use truetype fonts .ttf through using the functions
imagettftext
imagettfbbox
or
imagefttext
imageftbbox
(if your library is freetype these should work better)
Posted: Tue Sep 09, 2003 8:24 am
by DaiWelsh
Thanks for the answers, are truetype fonts platform dependent, or can I use any TTF on Solaris? Similarly for freetype?
BDF seems to be some form of binary font file that the non-ttf functions in GD uses, or were you being facetious?
Forgive my ignorance, I could survive quite happily with just one font so it all goes over my head...
Dai
Posted: Tue Sep 09, 2003 10:16 am
by JAM
It should work, tho I have not tested it on Solaris myself.
Reading
the manuals comments on the appropiate function for it, you'll see that there are many users discussing it in *nix terms (3rd from the top as example).