Edit report at http://bugs.php.net/bug.php?id=52403&edit=1
ID: 52403 Updated by: h...@php.net Reported by: h...@php.net Summary: imagettfbbox/imagettftext "Could not read font" error -Status: Bogus +Status: Open Type: Bug Package: GD related Operating System: CentOS4 PHP Version: 5.2.13 Block user comment: N Previous Comments: ------------------------------------------------------------------------ [2010-10-18 22:20:55] h...@php.net No, the message is ambiguous. Consider this... If GD is able to read the file, it is readable. If GD is unable to read the file, it is unreadable. We know the file is readable, that is not the problem. If GD is able to validate the file, it is valid. If GD is unable to validate the file, it is invalid. We do not know whether the file is valid or not. Alternatively, If GD is able to support the file, it is supported. If GD is unable to support the file, it is unsupported. We do not know whether the file is supported or not. To use "read" is too ambiguous in this context. ------------------------------------------------------------------------ [2010-10-18 20:29:04] paj...@php.net The message is correct. As some fonts are supported by some freetype versions. It does not mean that the font file is invalid, but that ft (gd) could not read it. ------------------------------------------------------------------------ [2010-10-18 18:32:39] h...@php.net To put it very simply, it incorrectly says "Could not read font", when it should say "Invalid font file". Could somebody fix this or do you need me to supply a patch? ------------------------------------------------------------------------ [2010-07-27 14:56:55] h...@php.net To clarify: Expected result: ---------------- Warning: imagettfbbox() [function.imagettfbbox]: Invalid font file in /home/share/www/dev/test/php/imagettfbbox.php on line 4 What PHP version? 5.2.13 Does font 'Vera.ttf' exist? Yes Is font 'Vera.ttf' readable? Yes Actual result: -------------- Warning: imagettfbbox() [function.imagettfbbox]: Could not read font in /home/share/www/dev/test/php/imagettfbbox.php on line 4 What PHP version? 5.2.13 Does font 'Vera.ttf' exist? Yes Is font 'Vera.ttf' readable? Yes ------------------------------------------------------------------------ [2010-07-27 10:57:18] h...@php.net Excuse me, but this is -NOT- the same bug. Just because it's simply related does not make it the same. The problem here is the error, not the TTF files, which is the problem described in the other bug report. Please check and try again. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52403 -- Edit this bug report at http://bugs.php.net/bug.php?id=52403&edit=1