[php-src] Issue #9073: Inconsistent Results with imagettfbbox

From: Date: Wed, 20 Jul 2022 19:37:30 +0000
Subject: [php-src] Issue #9073: Inconsistent Results with imagettfbbox
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241963@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9073 Author: oleibman ### Description The following code (run in a directory containing FreeMono.ttf) gives different results on Linux vs Windows: ```php <?php $fontFileName = realpath(__DIR__ . DIRECTORY_SEPARATOR . 'FreeMono.ttf'); var_dump(md5_file($fontFileName)); // to show using same file var_dump(imagettfbbox(10.0, 0.0, $fontFileName, 'Hello')); ``` Resulted in this output on Windows: ``` C:\git\ExactFont\testfont.php:3: string(32) "ec48e99df5d46035b62ef0d825b43336" C:\git\ExactFont\testfont.php:4: array(8) { [0] => int(0) [1] => int(0) [2] => int(39) [3] => int(0) [4] => int(39) [5] => int(-9) [6] => int(0) [7] => int(-9) } ``` But I got this output on a Linux Ubuntu system: ``` C:\git\ExactFont\testfont.php:3: string(32) "ec48e99df5d46035b62ef0d825b43336" C:\git\ExactFont\testfont.php:4: array(8) { [0] => int(0) [1] => int(1) [2] => int(41) [3] => int(1) [4] => int(41) [5] => int(-9) [6] => int(0) [7] => int(-9) } ``` ### PHP Version 7.4.3 on Linux; 7.4.26 and 8.0.13 and 8.1.0 on Windows ### Operating System Ubuntu 20.04.4 LTS; Windows 10 Enterprise 19044.1826

« previous php.bugs (#241963) next »