#45396 [Bgs->Asn]: imagepsbbox() built-in font support

From: Date: Mon, 04 Aug 2008 11:21:35 +0000
Subject: #45396 [Bgs->Asn]: imagepsbbox() built-in font support
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1050@lists.php.net to get a copy of this message
ID: 45396 Updated by: bjori@php.net Reported By: next_ghost at quick dot cz -Status: Bogus +Status: Assigned -Bug Type: GD related +Bug Type: Documentation problem Operating System: Linux PHP Version: 5.2.6 -Assigned To: +Assigned To: kalle New Comment: then please keep this report until its fixed. Previous Comments: ------------------------------------------------------------------------ [2008-08-04 10:21:52] next_ghost at quick dot cz What function can I use to calculate built-in font bounding box then? imageftbbox() and imagettfbbox() take font filename as argument and you just told me that imagepsbbox() doesn't support built-in fonts either. If there's no such function, consider this a feature request. ------------------------------------------------------------------------ [2008-08-04 10:06:26] kalle@php.net This is not a bug, but rather a documentation issue. Ill patch up the documentation... ------------------------------------------------------------------------ [2008-07-01 00:25:35] next_ghost at quick dot cz Description: ------------ Documentation says that imagepsbbox() can calculate bounding box for built-in fonts (font index 1 through 5). It doesn't work. imagestring() which accepts built-in fonts uses php_find_gd_font() to load font information. imagepsbbox() uses only ZEND_FETCH_RESOURCE(). Reproduce code: --------------- $box = imagepsbbox("foo", 1, 1); Expected result: ---------------- No warnings Actual result: -------------- Warning: imagepsbbox(): supplied argument is not a valid Type 1 font resource in foo.php on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45396&edit=1

« previous php.doc.bugs (#1050) next »