Bug #66083 [Opn->Fbk]: imagettfbox() returns different values

From: Date: Fri, 23 Sep 2016 14:40:51 +0000
Subject: Bug #66083 [Opn->Fbk]: imagettfbox() returns different values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204208@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66083&edit=1

 ID:                 66083
 Updated by:         cmb@php.net
 Reported by:        michael at bigmichi1 dot de
 Summary:            imagettfbox() returns different values
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            GD related
 Operating System:   Ubuntu 13.10 / Win7
 PHP Version:        5.5.5
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Please try with a current PHP snapshot and the bundled GD.


Previous Comments:
------------------------------------------------------------------------
[2016-03-31 11:36:37] mplomer at gmx dot de

For proposed fix and further info/discussion, see bug #53504

------------------------------------------------------------------------
[2013-11-12 16:44:49] michael at bigmichi1 dot de

Description:
------------
when i run the imagettfbox() under windows and also in linux with exactly the same parameters both
calls return differnt results.

Linux:
gd

GD Support => enabled
GD Version => 2.1.1-dev
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.12
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.2.49
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 0 => 0


Windows:
gd

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.10
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => unknown
PNG Support => enabled
libPNG Version => 1.5.14
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 0 => 0


Linux:
PHP Version => 5.5.5-1chl1~saucy1

System => Linux i920 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64
Build Date => Oct 21 2013 21:01:50
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
Additional .ini files parsed => /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-gd.ini,
/etc/php5/cli/conf.d/20-geoip.ini,
/etc/php5/cli/conf.d/20-gmp.ini,
/etc/php5/cli/conf.d/20-imagick.ini,
/etc/php5/cli/conf.d/20-intl.ini,
/etc/php5/cli/conf.d/20-ldap.ini,
/etc/php5/cli/conf.d/20-mcrypt.ini,
/etc/php5/cli/conf.d/20-mongo.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-pdo_pgsql.ini,
/etc/php5/cli/conf.d/20-pdo_sqlite.ini,
/etc/php5/cli/conf.d/20-pgsql.ini,
/etc/php5/cli/conf.d/20-readline.ini,
/etc/php5/cli/conf.d/20-sqlite3.ini,
/etc/php5/cli/conf.d/20-tidy.ini,
/etc/php5/cli/conf.d/20-xdebug.ini,
/etc/php5/cli/conf.d/20-xmlrpc.ini,
/etc/php5/cli/conf.d/20-xsl.ini

PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS
PHP Extension Build => API20121212,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data,
http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans


Windows:
PHP Version => 5.5.5

System => Windows NT LAPTOP 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) AMD64
Build Date => Oct 15 2013 11:43:22
Compiler => MSVC11 (Visual C++ 2012)
Architecture => x64
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build"
"--enable-debug-pack" "--disable-zts" "--disable-isapi"
"--disable-nsapi" "--without-mssql" "--without-pd
o-mssql" "--without-pi3web"
"--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8-11g=C:\php-sdk\oracl
e\instantclient11\sdk,shared" "--with-enchant=shared"
"--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared"
"--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\Users\Michael\Dropbox\pear\php\5.5\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS,VC11
PHP Extension Build => API20121212,NTS,VC11
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => php, file, glob, data, http, ftp, zip, compress.zlib, https, ftps, phar
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters => convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

Test script:
---------------
$bounds = imagettfbbox(12, 0, "Vera.ttf", "one");
print_r($bounds);

Expected result:
----------------
both calls return the same result regardless of the operating system

Actual result:
--------------
Windows:
(
    [0] => -1
    [1] => -1
    [2] => 26
    [3] => -1
    [4] => 26
    [5] => -10
    [6] => -1
    [7] => -10
)

Linux:
(
    [0] => -1
    [1] => 0
    [2] => 30
    [3] => 0
    [4] => 30
    [5] => -11
    [6] => -1
    [7] => -11
)



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=66083&edit=1


Thread (12 messages)

« previous php.bugs (#204208) next »