Edit report at http://bugs.php.net/bug.php?id=51571&edit=1
ID: 51571
Updated by: [email protected]
Reported by: leottan at imsweb dot com
Summary: Problems with character spacing in
imagettftext/imagefttext
-Status: Open
+Status: Feedback
Type: Bug
Package: GD related
Operating System: SUSE Ent. Linux v9 SP4 64bit
PHP Version: 5.2.13
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2010-04-16 17:01:15] leottan at imsweb dot com
Description:
------------
Our dev server was recently upgraded to PHP v5.2.13. With that upgrade
we have found that our png images are having kerning/tracking/spacing
problems. We've tried numerous fonts and haven't found a good solution
yet. imagettftextwithtracking -
http://www.php.net/manual/en/function.imagettfbbox.php#51373 - is
helping some but still isn't as nice as the old version of PHP was.
We are creating images using the GD library and writing text to the
images using font files and the imagettftext() or imagefttext()
functions.
I'm including examples of the new and old tahoma bold. Other fonts (bold
and non-bold) have the same problem. Some letters and numbers seem like
they're off-center or something like that.
Thanks!!
Test script:
---------------
ImageTTFText($imFinalImage,13,0,$x,$y,
$black,"/fonts/tahomabd.ttf",$titleText);
//I stripped that down some (taking out vars so you had the basic info)
//but that's the format along with our font size & font.
Expected result:
----------------
The usual text
old PHP v5.2.11 (the words are slightly different because this is our
dev server and the other one is the live server)
http://yfrog.com/i3goodlp
Actual result:
--------------
Messy text
new PHP
http://yfrog.com/i3badej
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51571&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.