php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61882 Cairo fails at CairoFtFontFace::__construct() on multiple invocations
Submitted: 2012-04-30 19:06 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dkozlowski at sevone dot com Assigned:
Status: Open Package: cairo (PECL)
PHP Version: 5.4.1 OS: Linux 2.6.30
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dkozlowski at sevone dot com
New email:
PHP Version: OS:

 

 [2012-04-30 19:06 UTC] dkozlowski at sevone dot com
Description:
------------
When trying to create multiple font faces from the same font file Cairo will 
throw the following exception 

Fatal error: Uncaught exception 'CairoException' with message 
'CairoFtFontFace::__construct(): An error occurred opening the file' in 
/root/test.php:5
Stack trace:
#0 /root/test.php(5): CairoFtFontFace->__construct('/root/DroidSans...')
#1 {main}
  thrown in /root/test.php on line 5

Test script:
---------------
<?

$cairo =  new CairoFtFontFace( "/root/DroidSansMono.ttf" );
print_r($cairo); 
$cairo =  new CairoFtFontFace( "/root/DroidSansMono.ttf" );
print_r($cairo); 

?>

Expected result:
----------------
two CairoFtFontFace Objects should be created 

Actual result:
--------------
One object is created and the second invocation throws an exception 

CairoFtFontFace Object
(
)
Fatal error: Uncaught exception 'CairoException' with message 
'CairoFtFontFace::__construct(): An error occurred opening the file' in 
/root/test.php:5
Stack trace:
#0 /root/test.php(5): CairoFtFontFace->__construct('/root/DroidSans...')
#1 {main}
  thrown in /root/test.php on line 5


Patches

pecl-cairo-php_streams.patch (last revision 2012-05-18 13:06 UTC by dkozlowski at sevone dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-18 13:25 UTC] dkozlowski at sevone dot com
The attached patch fixes this issue. There is a problem with the passing of stream information to the FreeType reader.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 07:01:25 2019 UTC