Bug #75656 [NEW]: imagettfbbox fails to find my font

From: Date: Fri, 08 Dec 2017 19:04:26 +0000
Subject: Bug #75656 [NEW]: imagettfbbox fails to find my font
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213019@lists.php.net to get a copy of this message
From: momchil at bojinov dot info Operating system: Windows PHP version: 7.1.12 Package: GD related Bug Type: Bug Bug description:imagettfbbox fails to find my font Description: ------------ Hello, I have a small repo here: https://github.com/bozhinov/pChart2.0-for-PHP7 I tested all of the code with PHP 7.1.11 x64 TS on a Windows 10 x64 machine and all was fine I then updated the php distribution to 7.1.12 x64 TS and started getting warnings: arning: imagettftext(): Could not find/open font in X:\SVN\External\pChart-dev\pChart\pDraw.php on line 1117 I can solve it by calling the function with realpath($ttfpath) instead The process monitor says that it finds the font OK but then starts looking at the Windows fonts folder and fails because these fonts are not there Please fix Momchil Test script: --------------- To induce it, download the release 2.2.0 please PHP distribution in the root folder and call any of the examples e.g. php.exe examples\example.cache.php Expected result: ---------------- Nothing Actual result: -------------- Warning: imagettfbbox(): Could not find/open font in X:\SVN\External\pChart-dev\pChart\pDraw.php on line 4878 Warning: imagettftext(): Could not find/open font in X:\SVN\External\pChart-dev\pChart\pDraw.php on line 1117 -- Edit bug report at https://bugs.php.net/bug.php?id=75656&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75656&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75656&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75656&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75656&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75656&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75656&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75656&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75656&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75656&r=support Expected behavior: https://bugs.php.net/fix.php?id=75656&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75656&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75656&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75656&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75656&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75656&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75656&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75656&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75656&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75656&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75656&r=mysqlcfg

« previous php.bugs (#213019) next »