Bug #52404 [NEW]: All TTF Files are invalid [ALL PHP.NET]
From: hm2k
Operating system:
PHP version: Irrelevant
Package: *General Issues
Bug Type: Bug
Bug description:All TTF Files are invalid [ALL 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 bug report at http://bugs.php.net/bug.php?id=52404&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52404&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52404&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52404&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52404&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52404&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52404&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52404&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52404&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52404&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52404&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52404&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52404&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52404&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52404&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52404&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52404&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52404&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52404&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52404&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52404&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52404&r=mysqlcfg
Thread (8 messages)
- hm2k@php.net