[libGD] #192 [Task opened] imagestring() fails with GDF file on Solaris
[email protected] Fri, 16 Jan 2009 22:18:23 +0100 (CET)
| Newsgroups | php.gd.bugs |
|---|---|
| Message-ID | <[email protected]> |
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Leif Neve (leifneve)
Attached to Project - libGD
Summary - imagestring() fails with GDF file on Solaris
Task Type - Bug Report
Category - Drawing function
Status - Unconfirmed
Assigned To -
Operating System - Other
Severity - Medium
Priority - Normal
Reported Version - 2.0.35
Due in Version - Undecided
Due Date - Undecided
Details - We can't get the imagestring() function to work with non-built-in
fonts. It works fine with built-in fonts (1-5). We have tried a
number of .gdf files unsuccessfully. We know the .gdf files are
loading successfully because we can use GD functions to report their width and height correctly.
We are running fully patched Solaris 10 and PHP-5.2.6. We have run tests both against PHP using the bundled GD library and also against PHP linked against a separately built GD 2.0.35 library.
The following script fails:
$font = imageloadfont('anonymous.gdf');
$fontWidth = imagefontwidth($font);
$fontHeight = imagefontheight($font);
$text = 'Hello World';
$im = imagecreate(strlen($text) * $fontWidth, $fontHeight);
$bgColor = imagecolorallocate($im, 255, 255, 255);
$fgColor = imagecolorallocate($im, 0, 0, 255);
imagestring($im, $font, 0, 0, $text, $fgColor);
header('Content-Type: image/png');
imagepng($im);
The above script works if you change the first line to:
$font = 5;
More information can be found at the following URL:
http://bugs.libgd.org/?do=details&task_id=192
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.