From: michaelw at darkhorse dot com Operating system: Mac OS X 10.2.x PHP version: 4.3.4RC1 PHP Bug Type: *Graphics related Bug description: imagepsloadfont() returns int, not resource
Description: ------------ imagepsloadfont() returns int, not resource, despite what the docs say. I believe this causes functions like imagepstext() to fail when looking for a custom- loaded font. My understanding is that imagepsloadfont is supposed to return an int > 5 to avoid conflict with the built-ins. Reproduce code: --------------- $font = imagepsloadfont("/Library/WebServer/Documents/meta/MetaBolRom.pfb"); // or locate your .pfb files on your machine echo gettype($font); imagepstext ($im, "Testing... It worked!", $font, 32, $white, $black, 32, 32); Expected result: ---------------- "int" Actual result: -------------- "resource Warning: imagepstext(): libt1 returned error -4 in / Library/WebServer/Documents/index.php on line xx" -- Edit bug report at http://bugs.php.net/?id=25830&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25830&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25830&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25830&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25830&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25830&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25830&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25830&r=support Expected behavior: http://bugs.php.net/fix.php?id=25830&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25830&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25830&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25830&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25830&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25830&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25830&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25830&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25830&r=float