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: 2021-07-22 12:52 UTC
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: Suspended Package: cairo (PECL)
PHP Version: 5.4.1 OS: Linux 2.6.30
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
25 + 2 = ?
Subscribe to this entry?

 
 [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.
 [2021-07-22 12:52 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2021-07-22 12:52 UTC] cmb@php.net
The cairo extension is unmained; until a new maintainer is found,
I suspend this ticket.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 15:01:56 2024 UTC