php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45920 imagefttext does not accept floated sizes
Submitted: 2008-08-26 10:14 UTC Modified: 2008-09-03 01:00 UTC
From: h dot purkart at portunity dot de Assigned: pajoye (profile)
Status: No Feedback Package: GD related
PHP Version: 5.2.6 OS: Debian 4.0 r4 (Apache/2.2.3)
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-08-26 10:14 UTC] h dot purkart at portunity dot de
Description:
------------
We've got a problem during generating images with the function imagefttext. It does not accept floated font sizes (as written in your documentation) any more, in our example "9.2". The generated image with size "9.2" is the same then generating this image with font-size "9", "9.3", "9.6", etc.

Our developing-system still runs with PHP 5.1.2. At this system the function imagefttext works fine as written in your documentation and accepts floated font sizes (see excepted result).

Reproduce code:
---------------
<?
// ### Generate Image
header("Content-type: image/png");
$imgNew = imagecreatetruecolor(200, 40);
$colorTake = imagecolorallocate($imgNew, 255, 255, 255);
imagefttext($imgNew, 8.9, 0, 5, 19, $colorTake, "/wwwroot/_cvs_users_smb/hpu/Schatz/images/generated/source/arialbd.ttf", strtoupper($sTextConform));
imagepng($imgNew);
?>

Expected result:
----------------
Generated image with PHP v5.1.2:
http://www.portunity.net/tmp/imagefttext-image-v5_1_2.png

Actual result:
--------------
Generated image with PHP v5.2.6:
http://www.portunity.net/tmp/imagefttext-image-v5_2_6.png

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-26 10:28 UTC] pajoye@php.net
It is not related to the floating point size but to the freetype version you are using, how it is built etc.

Also, we do not support debian's php and I do not support Debian's gd as the maintainer of this package made insane choices (BC breaks) and did not fix security issues.

I would suggest to try with a source install and freetype 2.3.x (or with the same version you use on your dev platform) and paste the link to the result here. I also need the details of your config (php and freetype version used).
 [2008-09-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 19:01:34 2024 UTC