ID: 34340 User updated by: brian at visionn dot com Reported By: brian at visionn dot com -Status: Closed +Status: Open Bug Type: GD related Operating System: Windows NT PHP Version: 5.1.0RC1 New Comment:
That one instance of the error was "reset" by restarting IIS, but any subsequent errors require a restart of IIS...here's a shorter snippet of test code: $font = imagepsloadfont("C:\\PATH_TO_FONT\\font_file.pfb"); $header_img = imagecreate(320, 20); $font_color = imagecolorallocate($header_img, 42, 86, 143); $bg_color = imagecolorallocate($header_img, 255, 255, 255); imagefill($header_img, 0, 0, $bg_color); imagepstext($header_img, "$text", $font, $fontsize, $font_color, $bg_color, 0, 16, 0, 0, 0, 16); Previous Comments: ------------------------------------------------------------------------ [2005-09-02 17:45:00] brian at visionn dot com The error was fixed by restarting IIS. ------------------------------------------------------------------------ [2005-09-02 07:23:28] [EMAIL PROTECTED] Provide a SHORT reproducing script. You don't need to define any functions, etc. to test this. (6 lines?) ------------------------------------------------------------------------ [2005-09-02 02:23:48] brian at visionn dot com Description: ------------ When calling imagepstext() on a .pfb file on Windows NT, I get returned "T1Lib Error: Font ID Invalid in this Context". The font file seems to load fine with imagepsloadfont() (returns resource identifier), but when used within imagepstext it doesn't seem to be working properly. Am I using an invalid font file? Line endings? Something to do with Windows directory permissions? Like I said, the load works fine to return a resource... Reproduce code: --------------- http://test.taxloopholes.com/font_test.php Expected result: ---------------- An image tag returned that will show an image dynamically generated showing the text passed to the function. Actual result: -------------- 2 : imagepstext() [function.imagepstext]: T1Lib Error: Font ID Invalid in this Context ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34340&edit=1