But when I try this on a page all on its lonesome, it gives the error:
Warning: Could not find/open font in c:\inetpub\wwwroot\PHPTests\gd\button.php on line 8
Code: Select all
<?php
$im = imagecreate (50, 250);
$bgcolor = ImageColorAllocate ($im, 0x77, 0x77, 0x77);
$color = ImageColorAllocate ($im, 0x00, 0x00, 0x00);
/* Line 8 */ ImageTTFText ($im, 35, 90, 40, 230, $color, "c:\\windows\\fonts\\fre3of9x.ttf", "test");
Imagepng ($im, "pic1.png");
ImageDestroy ($im);
echo "<html><body><img src="pic.png" border=0></body></html>";
?>The font i want to use is a barcode font, and it can be downloaded here: http://www.barcodesinc.com/free-barcode-font/
If anyone has any ideas, I would be most grateful to hear them.
- TwinkiE