ID:               34340
 Updated by:       [EMAIL PROTECTED]
 Reported By:      brian at visionn dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         GD related
 Operating System: Windows NT
 PHP Version:      5.1.0RC1
-Assigned To:      
+Assigned To:      pajoye
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

What do you mean by introduce an error? Provide the error script as
well if it is required to reproduce your problem.




Previous Comments:
------------------------------------------------------------------------

[2005-09-02 18:55:54] brian at visionn dot com

To reproduce, first run the code that work fine. Then introduce an
error, run it. Remove the error, run it. The clean code doesn't work
until a restart of IIS. There is a comment from 2001 in the docs about
this on the imagepstext page...so this might be a T1Lib error that it
can't recover from, and so wouldn't belong as a pure PHP bug(?)

------------------------------------------------------------------------

[2005-09-02 18:49:14] brian at visionn dot com

apologies, here's a better version of the code with hardcoded values:

$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, 18, $font_color,
$bg_color, 0, 16, 0, 0, 0, 16);

------------------------------------------------------------------------

[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

Reply via email to