imagepsloadfont on mac os x
| From: | Michael Winston | Date: | Thu, 09 Oct 2003 00:31:47 +0000 |
| Subject: | imagepsloadfont on mac os x | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165542@lists.php.net to get a copy of this message | ||
Hi-
I'm trying to get imagepsloadfont() to work. I'm on OS X and know next to nothing about font types or how the Mac might handle them differently.
Basically, using the below code, I'm trying to call up Skia.dfont, one of the fonts that comes with OS X. The code I'm using is straight from the manual, with my font path substituted:
<?php
header ("Content-type: image/jpeg");
$im = imagecreate (350, 45);
$black = imagecolorallocate ($im, 0, 0, 0);
$white = imagecolorallocate ($im, 255, 255, 255);
$font = imagepsloadfont ("/Libarary/Fonts/Skia.dfont"); // or locate your .pfb files on your machine
imagepstext ($im, "Testing... It worked!", $font, 32, $white, $black, 32, 32);
imagepsfreefont ($font);
imagejpeg ($im, "", 100); //for best quality...your mileage may vary
imagedestroy ($im);
?>
However, I get the message "error loading font". I've compiled --with-gd --with-t1lib, etc. so I know the command is recognized.
This is driving me nuts. Any clues?
Thanks,
Michael