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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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)

Pull Requests

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: Sat Dec 21 14:01:32 2024 UTC