ID: 22513 Comment by: jeroen at unfix dot org Reported By: jeremy at nirvani dot net Status: No Feedback Bug Type: GD related Operating System: linux 2.4.19 PHP Version: 5CVS-2003-03-03 (dev) New Comment:
Clearly this is a multithreading kind of issue which still happens, it apparently is really difficult to use mutexes or simply write re-entrant code. Nevertheless for people getting this, just use, as a very dirty hack: $size = ImageTTFBbox($fontsize, 0, $fontfile, $txt); $try = 1; while ($size[2] < 0 && $try < 10) $size = ImageTTFBbox($fontsize, 0, $fontfile, $txt); et voila, $size should mostly be okay ;) Previous Comments: ------------------------------------------------------------------------ [2004-11-16 18:45:04] Jason at amp-design dot net I have had the same problems with PHP 5.0.2. I have found fiddling with the ./configure parameters for ttf rendering when compiling PHP will help resolve some of the problems. However I still find that text looks distorted under Linux when compared to Mac ------------------------------------------------------------------------ [2003-08-10 21:35:34] nick at itomic dot com as you will notice if you look at the example URL, it works fine. I compiled with the system library of GD, instead of the internal GD library. It now works fine. ------------------------------------------------------------------------ [2003-08-08 06:33:08] nick at itomic dot com ok I am getting these strange values, on php4.3.2 with apache 1.3.28. on redhat 7.2, with imagettfbbox here is some example dump: width -1073758320 : height -5379645430array(8) { [0]=> int(60) [1]=> int(-1073758256) [2]=> int(-1073758264) [3]=> int(1077688217) [4]=> int(48) [5]=> int(0) [6]=> int(11288) [7]=> int(1078099916) } here is a url that will reproduce: http://test.earth.itomic.com/build_text_image.php?imgStr=PRODUCT%20SPOTLIGHT&fontSize=14&font=v5loxicar the source is here: http://test.earth.itomic.com/build_text_image.php.txt If this has been fixed in CVS, is there a version that works? or is there one that will be coming soon? ------------------------------------------------------------------------ [2003-06-26 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over 2 weeks, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2003-06-10 19:15:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ 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 http://bugs.php.net/22513 -- Edit this bug report at http://bugs.php.net/?id=22513&edit=1