FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=17619&edit=1

ID: 17619
Updated by: daniel.oconnor@gmail.com
Reported By: hm2k at php dot net
Summary: Warning: imagettfbbox() [function.imagettfbbox]:
Could not read font ...
Status: Open
Type: Bug
Package: Image_Text
Package Version: SVN
PHP Version: 5.3.2
Roadmap Versions:
New Comment:

Marking package as unmaintained


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

[2010-07-22 12:38:48] hm2k

Added #patch
bug:17619;patch:better-font-file-error-checking;revision:1279802327;.

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

[2010-07-22 12:38:18] hm2k

This error is caused by a corrupt or invalid font file.

I reported the incorrectly described error to php:
http://bugs.php.net/bug.php?id=52403

I believe what this script should do is test the font file to ensure it
is valid before it attempts to run.

I will include a patch.

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

[2010-07-21 18:34:43] hm2k

I also found that if I comment out the font_file line in the options I
get the following error:

"Fontfile not found or not readable."

Is a font a requirement? Can't it fall back on the default system font?

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

[2010-07-21 18:30:54] hm2k

Description:
------------
I'm trying out the supplied example.php (from SVN) and I'm getting this
error:

Warning: imagettfbbox() [function.imagettfbbox]: Could not read font in
/usr/share/pear/Image/Text.php on line 832

Warning: imagettfbbox() [function.imagettfbbox]: Could not read font in
/usr/share/pear/Image/Text.php on line 794

It's repeated many times, which seems to be because of bad error
checking to ensure the font file is readable at the start.

Although I understand that the error is because it can't read the font,
but if this is the case, why is the "Fontfile not found or not
readable." not being displayed in this case?

Test script:
---------------
example.php from the svn

Expected result:
----------------
Display the example image(s).

Actual result:
--------------
Too much to display here...

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

Search Discussions

  • Daniel Oconnor at Dec 9, 2011 at 4:23 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=17619&edit=1

    ID: 17619
    Updated by: daniel.oconnor@gmail.com
    Reported By: hm2k at php dot net
    Summary: Warning: imagettfbbox() [function.imagettfbbox]:
    Could not read font ...
    -Status: Open
    +Status: Closed
    Type: Bug
    Package: Image_Text
    Package Version: SVN
    PHP Version: 5.3.2
    -Assigned To:
    +Assigned To: doconnor
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: doconnor
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.




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

    [2011-12-09 16:51:53] doconnor

    Marking package as unmaintained

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

    [2010-07-22 12:38:48] hm2k

    Added #patch
    bug:17619;patch:better-font-file-error-checking;revision:1279802327;.

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

    [2010-07-22 12:38:18] hm2k

    This error is caused by a corrupt or invalid font file.

    I reported the incorrectly described error to php:
    http://bugs.php.net/bug.php?id=52403

    I believe what this script should do is test the font file to ensure it
    is valid before it attempts to run.

    I will include a patch.

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

    [2010-07-21 18:34:43] hm2k

    I also found that if I comment out the font_file line in the options I
    get the following error:

    "Fontfile not found or not readable."

    Is a font a requirement? Can't it fall back on the default system font?

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

    [2010-07-21 18:30:54] hm2k

    Description:
    ------------
    I'm trying out the supplied example.php (from SVN) and I'm getting this
    error:

    Warning: imagettfbbox() [function.imagettfbbox]: Could not read font in
    /usr/share/pear/Image/Text.php on line 832

    Warning: imagettfbbox() [function.imagettfbbox]: Could not read font in
    /usr/share/pear/Image/Text.php on line 794

    It's repeated many times, which seems to be because of bad error
    checking to ensure the font file is readable at the start.

    Although I understand that the error is because it can't read the font,
    but if this is the case, why is the "Fontfile not found or not
    readable." not being displayed in this case?

    Test script:
    ---------------
    example.php from the svn

    Expected result:
    ----------------
    Display the example image(s).

    Actual result:
    --------------
    Too much to display here...

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 9, '11 at 3:52p
activeDec 9, '11 at 4:23p
posts2
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 2 posts

People

Translate

site design / logo © 2022 Grokbase