Bug #52404 [Asn]: All TTF Files are invalid [ALL PHP.NET]
| From: | rasmus@php.net | Date: | Mon, 26 Jul 2010 23:54:48 +0000 |
| Subject: | Bug #52404 [Asn]: All TTF Files are invalid [ALL PHP.NET] | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-152814@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52404&edit=1
ID: 52404
Updated by: rasmus@php.net
Reported by: hm2k@php.net
Summary: All TTF Files are invalid [ALL PHP.NET]
Status: Assigned
Type: Bug
Package: *General Issues
PHP Version: Irrelevant
Assigned To: rasmus
Block user comment: N
New Comment:
You may just have to re-import them into Subversion or something. All I
did was
flip the svn property so Subversion wouldn't mangle them.
Previous Comments:
------------------------------------------------------------------------
[2010-07-27 01:02:53] kalle@php.net
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?
------------------------------------------------------------------------
[2010-07-22 15:13:56] hm2k@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