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...
------------------------------------------------------------------------