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

ID: 17619
Updated by: hm2k@php.net
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:

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?


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

[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

  • Hm2k at Jul 22, 2010 at 12:38 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=17619&edit=1

    ID: 17619
    Updated by: hm2k@php.net
    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:

    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.


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

    [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
postedJul 21, '10 at 6:34p
activeJul 22, '10 at 12:38p
posts2
users1
websitepear.php.net

1 user in discussion

Hm2k: 2 posts

People

Translate

site design / logo © 2021 Grokbase