#25830 [Opn->Bgs]: imagepsloadfont() returns int, not resource

From: Date: Mon, 13 Oct 2003 01:55:33 +0000
Subject: #25830 [Opn->Bgs]: imagepsloadfont() returns int, not resource
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-48876@lists.php.net to get a copy of this message
ID: 25830 Updated by: sniper@php.net Reported By: michaelw at darkhorse dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Mac OS X 10.2.x PHP Version: 4.3.4RC1 New Comment: Works fine for me. (Hint: Provide a COMPLETE example script) Previous Comments: ------------------------------------------------------------------------ [2003-10-10 17:33:56] michaelw at darkhorse dot com 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 this bug report at http://bugs.php.net/?id=25830&edit=1

« previous php.bugs (#48876) next »