Edit report at http://bugs.php.net/bug.php?id=52404&edit=1
ID: 52404 Updated by: ka...@php.net Reported by: h...@php.net Summary: All TTF Files are invalid [ALL PHP.NET] -Status: Open +Status: Assigned Type: Bug Package: *General Issues PHP Version: Irrelevant -Assigned To: +Assigned To: rasmus Block user comment: N New Comment: Confirmed on Windows XP aswell (unreadable font files in the font viewer) Rasmus: You did this change, should it be reverted or do you have any easy fix on your mind? Previous Comments: ------------------------------------------------------------------------ [2010-07-22 15:13:56] h...@php.net Description: ------------ All of the TTF files that are on PHP.net appear to be invalid/corrupt. A change that happened 12 months ago with the description of "Fix TTF files" appears to be where the problem lies. http://svn.php.net/viewvc?view=revision&revision=284292 To fix this, this revision should be reverted to all files. On Windows, when you try to open any of these files it will say "The requested file *.ttf was not a valid font file". Here at PHP, we get a different message when using the imagettfbbox() function... "Could not read font". In the example below I am using the arial.ttf file which can be downloaded here: http://svn.php.net/viewvc/web/php/trunk/bin/arial.ttf?view=co Test script: --------------- <?php $font = 'fonts/arial.ttf'; $read = file_exists($font)?'Yes':'No'; echo "\n<br>Does font '$font' exist? ".$read; $read = is_readable($font)?'Yes':'No'; echo "\n<br>Is font '$font' readable? ".$read; $test = @imagettfbbox(1, 1, $font, 1)?'Yes':'No'; echo "\n<br>Is font '$font' valid? ".$test; echo "\n<br>What PHP version? ".phpversion(); ?> Expected result: ---------------- Does font 'fonts/arial.ttf' exist? Yes Is font 'fonts/arial.ttf' readable? Yes Is font 'fonts/arial.ttf' valid? Yes What PHP version? 5.2.13 Actual result: -------------- Does font 'fonts/arial.ttf' exist? Yes Is font 'fonts/arial.ttf' readable? Yes Is font 'fonts/arial.ttf' valid? No What PHP version? 5.2.13 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52404&edit=1