Edit report at https://bugs.php.net/bug.php?id=66083&edit=1
ID: 66083
Comment by: michael at bigmichi1 dot de
Reported by: michael at bigmichi1 dot de
Summary: imagettfbox() returns different values
Status: Feedback
Type: Bug
Package: GD related
Operating System: Ubuntu 13.10 / Win7
PHP Version: 5.5.5
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
font file can be found here:
http://www.dafont.com/de/bitstream-vera-sans.font
reproducer:
<?php
$bounds = imagettfbbox(12, 0, "Vera.ttf", "one");
print_r($bounds);
Previous Comments:
------------------------------------------------------------------------
[2016-09-27 13:16:35] cmb@php.net
Thanks!
Can you please supply a minimal self-contained reproduce script?
If there is a non-standard font involved, please make this
available for download somewhere, too.
------------------------------------------------------------------------
[2016-09-27 12:10:35] michael at bigmichi1 dot de
linux uses libfreetype 2.6.1
windows uses libfreetype 2.6.2
------------------------------------------------------------------------
[2016-09-27 11:46:45] cmb@php.net
Thanks for testing!
I assume these differences are caused by different libfreetype
versions/configurations. On Windows you're probably using
libfreetype 2.6.2 (or something close to that). Which libfreetype
version do you use on Linux? There are known (but unresolved)
issues with libfreetype 2.5.x-ubuntu.
------------------------------------------------------------------------
[2016-09-27 11:28:10] michael at bigmichi1 dot de
tried with the 7.1-dev with bundled gd but still different outputs.
win:
PHP 7.1.0-dev (cli) (built: Sep 26 2016 21:23:33) ( NTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
gd
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.6.2
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 9 compatible
PNG Support => enabled
libPNG Version => 1.6.21
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled
Array
(
[0] => 1
[1] => 0
[2] => 28
[3] => 0
[4] => 28
[5] => -9
[6] => 1
[7] => -9
)
linux:
PHP 7.1.0RC1 (cli) (built: Sep 27 2016 13:10:41) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
gd
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.6.1
GIF Read Support => enabled
GIF Create Support => enabled
PNG Support => enabled
libPNG Version => 1.2.54
WBMP Support => enabled
XBM Support => enabled
Array
(
[0] => -1
[1] => -1
[2] => 26
[3] => -1
[4] => 26
[5] => -10
[6] => -1
[7] => -10
)
------------------------------------------------------------------------
[2016-09-23 14:40:50] cmb@php.net
Please try with a current PHP snapshot and the bundled GD.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66083
--
Edit this bug report at https://bugs.php.net/bug.php?id=66083&edit=1