Professional Web Applications Themes

#46038 [NEW]: imagepsloadfont not working - PHP Bugs

From: cory dot mawhorter at ephective dot com Operating system: Windows Vista PHP version: 5.2.6 PHP Bug Type: GD related Bug description: imagepsloadfont not working Description: ------------ I can't get the the example given at http://php.net/imagepstext to work at all under Windows. I have GD with t1lib enabled but it is producing an error and will not load the font. The same code runs fine under linux. Originally, I was getting a "Font file not found" error even though the font file was definitely there. I downloaded and installed the T1Lib from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ] for giggles and the ...

  1. #1

    Default #46038 [NEW]: imagepsloadfont not working

    From: cory dot mawhorter at ephective dot com
    Operating system: Windows Vista
    PHP version: 5.2.6
    PHP Bug Type: GD related
    Bug description: imagepsloadfont not working

    Description:
    ------------
    I can't get the the example given at http://php.net/imagepstext to work at
    all under Windows. I have GD with t1lib enabled but it is producing an
    error and will not load the font. The same code runs fine under linux.

    Originally, I was getting a "Font file not found" error even though the
    font file was definitely there. I downloaded and installed the T1Lib from
    sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ] for
    giggles and the error changed to the one below. This may just be a
    coincidence, though.

    Reproduce code:
    ---------------
    Code from http://php.net/imagepstext example. Comments removed.

    <?php
    $im = imagecreatetruecolor(200, 200);
    $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255);

    $font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');

    imagepstext($im, 'Sample text is simple', $font, 12, $black, $white, 50,
    50);

    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>

    Expected result:
    ----------------
    Image rendered without errors.

    Actual result:
    --------------
    Trying to run the above code gives the following error:

    Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
    Error Scanning Font File in [path]\pstest.php on line 13

    I've tried with a couple different fonts and always get the same result.
    I run the same code on my linux server with the same fonts without issue.

    --
    Edit bug report at http://bugs.php.net/?id=46038&edit=1
    --
    Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46038&r=trysnapshot52
    Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46038&r=trysnapshot53
    Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46038&r=trysnapshot60
    Fixed in CVS: http://bugs.php.net/fix.php?id=46038&r=fixedcvs
    Fixed in release: http://bugs.php.net/fix.php?id=46038&r=alreadyfixed
    Need backtrace: http://bugs.php.net/fix.php?id=46038&r=needtrace
    Need Reproduce Script: http://bugs.php.net/fix.php?id=46038&r=needscript
    Try newer version: http://bugs.php.net/fix.php?id=46038&r=oldversion
    Not developer issue: http://bugs.php.net/fix.php?id=46038&r=support
    Expected behavior: http://bugs.php.net/fix.php?id=46038&r=notwrong
    Not enough info: http://bugs.php.net/fix.php?id=46038&r=notenoughinfo
    Submitted twice: http://bugs.php.net/fix.php?id=46038&r=submittedtwice
    register_globals: http://bugs.php.net/fix.php?id=46038&r=globals
    PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46038&r=php4
    Daylight Savings: http://bugs.php.net/fix.php?id=46038&r=dst
    IIS Stability: http://bugs.php.net/fix.php?id=46038&r=isapi
    Install GNU Sed: http://bugs.php.net/fix.php?id=46038&r=gnused
    Floating point limitations: http://bugs.php.net/fix.php?id=46038&r=float
    No Zend Extensions: http://bugs.php.net/fix.php?id=46038&r=nozend
    MySQL Configuration Error: http://bugs.php.net/fix.php?id=46038&r=mysqlcfg

    cory Guest

  2. #2

    Default #46038 [Opn->Asn]: imagepsloadfont not working

    ID: 46038
    Updated by: net
    Reported By: cory dot mawhorter at ephective dot com
    -Status: Open
    +Status: Assigned
    Bug Type: GD related
    Operating System: Windows Vista
    PHP Version: 5.2.6
    -Assigned To:
    +Assigned To: pajoye
    New Comment:

    Pierre, any idea?


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

    [2008-09-10 06:03:14] cory dot mawhorter at ephective dot com

    Description:
    ------------
    I can't get the the example given at http://php.net/imagepstext to work
    at all under Windows. I have GD with t1lib enabled but it is producing
    an error and will not load the font. The same code runs fine under
    linux.

    Originally, I was getting a "Font file not found" error even though the
    font file was definitely there. I downloaded and installed the T1Lib
    from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ]
    for giggles and the error changed to the one below. This may just be a
    coincidence, though.

    Reproduce code:
    ---------------
    Code from http://php.net/imagepstext example. Comments removed.

    <?php
    $im = imagecreatetruecolor(200, 200);
    $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255);

    $font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');

    imagepstext($im, 'Sample text is simple', $font, 12, $black, $white,
    50, 50);

    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>

    Expected result:
    ----------------
    Image rendered without errors.

    Actual result:
    --------------
    Trying to run the above code gives the following error:

    Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
    Error Scanning Font File in [path]\pstest.php on line 13

    I've tried with a couple different fonts and always get the same
    result. I run the same code on my linux server with the same fonts
    without issue.


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


    --
    Edit this bug report at http://bugs.php.net/?id=46038&edit=1

    johannes@php.net Guest

  3. #3

    Default #46038 [Asn->Fbk]: imagepsloadfont not working

    ID: 46038
    Updated by: net
    Reported By: cory dot mawhorter at ephective dot com
    -Status: Assigned
    +Status: Feedback
    Bug Type: GD related
    Operating System: Windows Vista
    PHP Version: 5.2.6
    Assigned To: pajoye
    New Comment:

    you do not need (and should not) download the T1Lib dll. It is already
    in the extension.

    Do you have the font files please?


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

    [2008-09-15 00:38:48] net

    Pierre, any idea?

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

    [2008-09-10 06:03:14] cory dot mawhorter at ephective dot com

    Description:
    ------------
    I can't get the the example given at http://php.net/imagepstext to work
    at all under Windows. I have GD with t1lib enabled but it is producing
    an error and will not load the font. The same code runs fine under
    linux.

    Originally, I was getting a "Font file not found" error even though the
    font file was definitely there. I downloaded and installed the T1Lib
    from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ]
    for giggles and the error changed to the one below. This may just be a
    coincidence, though.

    Reproduce code:
    ---------------
    Code from http://php.net/imagepstext example. Comments removed.

    <?php
    $im = imagecreatetruecolor(200, 200);
    $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255);

    $font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');

    imagepstext($im, 'Sample text is simple', $font, 12, $black, $white,
    50, 50);

    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>

    Expected result:
    ----------------
    Image rendered without errors.

    Actual result:
    --------------
    Trying to run the above code gives the following error:

    Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
    Error Scanning Font File in [path]\pstest.php on line 13

    I've tried with a couple different fonts and always get the same
    result. I run the same code on my linux server with the same fonts
    without issue.


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


    --
    Edit this bug report at http://bugs.php.net/?id=46038&edit=1

    pajoye@php.net Guest

  4. #4

    Default #46038 [Fbk->Opn]: imagepsloadfont not working

    ID: 46038
    User updated by: cory dot mawhorter at ephective dot com
    Reported By: cory dot mawhorter at ephective dot com
    -Status: Feedback
    +Status: Open
    Bug Type: GD related
    Operating System: Windows Vista
    PHP Version: 5.2.6
    Assigned To: pajoye
    New Comment:

    I didnít want to make them available online because of copyright. Iíve
    emailed you the two fonts I most recently tried.

    The first is Adobeís Albertus MT and the second is Porcelain.

    Let me know if for some reason you can't receive the attachment or
    don't receive the email and I'll upload them someplace.


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

    [2008-09-15 06:01:54] net

    you do not need (and should not) download the T1Lib dll. It is already
    in the extension.

    Do you have the font files please?

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

    [2008-09-15 00:38:48] net

    Pierre, any idea?

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

    [2008-09-10 06:03:14] cory dot mawhorter at ephective dot com

    Description:
    ------------
    I can't get the the example given at http://php.net/imagepstext to work
    at all under Windows. I have GD with t1lib enabled but it is producing
    an error and will not load the font. The same code runs fine under
    linux.

    Originally, I was getting a "Font file not found" error even though the
    font file was definitely there. I downloaded and installed the T1Lib
    from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ]
    for giggles and the error changed to the one below. This may just be a
    coincidence, though.

    Reproduce code:
    ---------------
    Code from http://php.net/imagepstext example. Comments removed.

    <?php
    $im = imagecreatetruecolor(200, 200);
    $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255);

    $font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');

    imagepstext($im, 'Sample text is simple', $font, 12, $black, $white,
    50, 50);

    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>

    Expected result:
    ----------------
    Image rendered without errors.

    Actual result:
    --------------
    Trying to run the above code gives the following error:

    Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
    Error Scanning Font File in [path]\pstest.php on line 13

    I've tried with a couple different fonts and always get the same
    result. I run the same code on my linux server with the same fonts
    without issue.


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


    --
    Edit this bug report at http://bugs.php.net/?id=46038&edit=1

    cory Guest

  5. #5

    Default #46038 [Opn]: imagepsloadfont not working

    ID: 46038
    User updated by: cory dot mawhorter at ephective dot com
    Reported By: cory dot mawhorter at ephective dot com
    Status: Open
    Bug Type: GD related
    Operating System: Windows Vista
    PHP Version: 5.2.6
    Assigned To: pajoye
    New Comment:

    If you didn't receive the email with the font files I can make them
    available for you to download elsewhere.


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

    [2008-09-15 08:24:04] cory dot mawhorter at ephective dot com

    I didnít want to make them available online because of copyright. Iíve
    emailed you the two fonts I most recently tried.

    The first is Adobeís Albertus MT and the second is Porcelain.

    Let me know if for some reason you can't receive the attachment or
    don't receive the email and I'll upload them someplace.

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

    [2008-09-15 06:01:54] net

    you do not need (and should not) download the T1Lib dll. It is already
    in the extension.

    Do you have the font files please?

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

    [2008-09-15 00:38:48] net

    Pierre, any idea?

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

    [2008-09-10 06:03:14] cory dot mawhorter at ephective dot com

    Description:
    ------------
    I can't get the the example given at http://php.net/imagepstext to work
    at all under Windows. I have GD with t1lib enabled but it is producing
    an error and will not load the font. The same code runs fine under
    linux.

    Originally, I was getting a "Font file not found" error even though the
    font file was definitely there. I downloaded and installed the T1Lib
    from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ]
    for giggles and the error changed to the one below. This may just be a
    coincidence, though.

    Reproduce code:
    ---------------
    Code from http://php.net/imagepstext example. Comments removed.

    <?php
    $im = imagecreatetruecolor(200, 200);
    $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255);

    $font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');

    imagepstext($im, 'Sample text is simple', $font, 12, $black, $white,
    50, 50);

    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>

    Expected result:
    ----------------
    Image rendered without errors.

    Actual result:
    --------------
    Trying to run the above code gives the following error:

    Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
    Error Scanning Font File in [path]\pstest.php on line 13

    I've tried with a couple different fonts and always get the same
    result. I run the same code on my linux server with the same fonts
    without issue.


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


    --
    Edit this bug report at http://bugs.php.net/?id=46038&edit=1

    cory Guest

  6. #6

    Default #46038 [Opn->Asn]: imagepsloadfont not working

    ID: 46038
    Updated by: net
    Reported By: cory dot mawhorter at ephective dot com
    -Status: Open
    +Status: Assigned
    Bug Type: GD related
    Operating System: Windows Vista
    PHP Version: 5.2.6
    Assigned To: pajoye


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

    [2008-09-22 09:36:51] cory dot mawhorter at ephective dot com

    If you didn't receive the email with the font files I can make them
    available for you to download elsewhere.

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

    [2008-09-15 08:24:04] cory dot mawhorter at ephective dot com

    I didnít want to make them available online because of copyright. Iíve
    emailed you the two fonts I most recently tried.

    The first is Adobeís Albertus MT and the second is Porcelain.

    Let me know if for some reason you can't receive the attachment or
    don't receive the email and I'll upload them someplace.

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

    [2008-09-15 06:01:54] net

    you do not need (and should not) download the T1Lib dll. It is already
    in the extension.

    Do you have the font files please?

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

    [2008-09-15 00:38:48] net

    Pierre, any idea?

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

    [2008-09-10 06:03:14] cory dot mawhorter at ephective dot com

    Description:
    ------------
    I can't get the the example given at http://php.net/imagepstext to work
    at all under Windows. I have GD with t1lib enabled but it is producing
    an error and will not load the font. The same code runs fine under
    linux.

    Originally, I was getting a "Font file not found" error even though the
    font file was definitely there. I downloaded and installed the T1Lib
    from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ]
    for giggles and the error changed to the one below. This may just be a
    coincidence, though.

    Reproduce code:
    ---------------
    Code from http://php.net/imagepstext example. Comments removed.

    <?php
    $im = imagecreatetruecolor(200, 200);
    $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255);

    $font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');

    imagepstext($im, 'Sample text is simple', $font, 12, $black, $white,
    50, 50);

    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>

    Expected result:
    ----------------
    Image rendered without errors.

    Actual result:
    --------------
    Trying to run the above code gives the following error:

    Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
    Error Scanning Font File in [path]\pstest.php on line 13

    I've tried with a couple different fonts and always get the same
    result. I run the same code on my linux server with the same fonts
    without issue.


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


    --
    Edit this bug report at http://bugs.php.net/?id=46038&edit=1

    jani@php.net Guest

Similar Threads

  1. #25830 [Opn->Bgs]: imagepsloadfont() returns int, not resource
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: October 13th, 01:54 AM
  2. #25830 [NEW]: imagepsloadfont() returns int, not resource
    By michaelw at darkhorse dot com in forum PHP Development
    Replies: 0
    Last Post: October 10th, 09:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139