Asperon Posted August 16, 2007 Share Posted August 16, 2007 when you use putenv('GDFONTPATH=C:\WINDOWS\Fonts'); it gets your fonts, but if you were to be using it on a web server you don't want it going back to your hard drive to get the fonts, can you copy the fonts into a folder on your webserver and just reference it there? Quote Link to comment https://forums.phpfreaks.com/topic/65284-solved-gd-fonts/ Share on other sites More sharing options...
Asperon Posted August 16, 2007 Author Share Posted August 16, 2007 ok new problem, I use GD so Iknow it works, but the text for this will not display, anyone know why?? <?php putenv('GDFONTPATH=C:\WINDOWS\Fonts'); $fontsize = 33; $text = 'Hello World'; $font = 'arial'; $height = 200; $width = 400; $im = ImagecreateTrueColor($width, $height); $white = ImageColorAllocate($im,255,255,255); $blue = ImageColorAllocate($im,0,0,64); ImageFill($im,0,0,$blue); ImageLine($im,20,150,200,150,$white); ImageTTFText($im,$fontsize,0,50,135,$white,$font,$text); Header('Content-type: image/Png'); ImagePng($im); ImageDestroy($im); ?> Quote Link to comment https://forums.phpfreaks.com/topic/65284-solved-gd-fonts/#findComment-326016 Share on other sites More sharing options...
Asperon Posted August 16, 2007 Author Share Posted August 16, 2007 anything?? (bump) Quote Link to comment https://forums.phpfreaks.com/topic/65284-solved-gd-fonts/#findComment-326043 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.