php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31060 imageftbbox does not use linespacing parameter
Submitted: 2004-12-11 16:16 UTC Modified: 2005-01-15 00:09 UTC
Votes:13
Avg. Score:5.0 ± 0.0
Reproduced:12 of 12 (100.0%)
Same Version:10 (83.3%)
Same OS:5 (41.7%)
From: admin at students-fhtw dot de Assigned: sniper (profile)
Status: Closed Package: GD related
PHP Version: 4CVS, 5CVS (2005-01-15) OS: *
Private report: No CVE-ID: None
 [2004-12-11 16:16 UTC] admin at students-fhtw dot de
Description:
------------
It seems like imageftbbox() is not using the linespacing parameter whereas imagefttext() does. I have been trying to figure out the problem but so far I have no other clue than it being a bug. I have tried both postscipt and truetype fonts.

configure parameters:
'./configure' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat' '--with-zlib=/usr/local' '--with-zlib-dir=/usr/local' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-ldap' '--with-mysql=/usr' '--enable-memory-limit' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-dba' '--enable-dbase' '--with-ndbm' '--with-ndb' '--with-mcrypt' '--with-curl=/usr/local' '--with-apxs=/usr/local/apache/bin/apxs'

Reproduce code:
---------------
<?php
$bbox = imageftbbox( 10, 0, "0371A___.PFB", "Text Text Text Text Text Text\r\nText Text", array("linespacing" => 0.3) );
trigger_error($bbox[1] - $bbox[5]);
?>


Expected result:
----------------
I expected different values for the height ($bbox[1] - $bbox[5]) for different linespacing parameters.

Actual result:
--------------
The height reported is always "30" regardless of the supplied linespacing value (eg. 0.3, 1.0, 2.3 etc.).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-15 00:09 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC