php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36498 The native ttf functions are broken
Submitted: 2006-02-23 17:25 UTC Modified: 2006-03-03 01:00 UTC
From: capile at tcdesign dot com dot br Assigned:
Status: No Feedback Package: GD related
PHP Version: 4.4.2 OS: Linux
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: capile at tcdesign dot com dot br
New email:
PHP Version: OS:

 

 [2006-02-23 17:25 UTC] capile at tcdesign dot com dot br
Description:
------------
The TTF functions like imagettfbbox, imagettftext do not work. imagettfbbox return weird results and imagettftext does not render anything.

Everything worked fine for PHP-4.3.10 (expected result). The setup was made with the bundled GD and native ttf support.

Reproduce code:
---------------
<?php print_r(imagettfbbox ( '9', '0', 'garamond.ttf', 'Sample text')); ?>

Expected result:
----------------
Array
(
    [0] => -1
    [1] => 3
    [2] => 49
    [3] => 3
    [4] => 49
    [5] => -9
    [6] => -1
    [7] => -9
)


Actual result:
--------------
Array
(
    [0] => 1
    [1] => 11
    [2] => -1073761736
    [3] => 1083817944
    [4] => 1083820576
    [5] => 1083820576
    [6] => -1073761720
    [7] => 1083048044
)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-23 18:21 UTC] capile at tcdesign dot com dot br
Just tried the latest stable snapshot, and still an awkward result:

php4-STABLE-200602231535/bin/php ~/gd-test.php 
Array
(
    [0] => 1
    [1] => 11
    [2] => -1073758856
    [3] => 1083817944
    [4] => 1083820576
    [5] => 1083820576
    [6] => -1073758840
    [7] => 1083048044
)

This did not happen in 4.4.2 release (not snapshot) in Win32, neither in 4.4.1 release in FreeBSD (didn't test the 4.4.2 version on FreeBSD)
 [2006-02-23 19:41 UTC] tony2001@php.net
Works fine here.
Please put the font somewhere and provide the link.
 [2006-03-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-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 12 11:01:32 2025 UTC