tags:

views:

361

answers:

1

Hello,

Our dev server was recently upgraded to PHP v5.2.13. With that upgrade we have found that our png images are having kerning (letter spacing) problems. We've tried numerous fonts and haven't found a solution yet.

We are creating images using the GD library and writing text to the images using font files and the imagettftext() or imagefttext() functions.

Has anyone else run into this? Am I misunderstanding something or should this be submitted to PHP as a bug? Are there any cool workarounds I haven't thought of yet?

Here's an example 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.

Bad - new PHP http://yfrog.com/i3badej

Good - 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

Thanks in advance!

Neil

Edit: hmmm, tried to embed images using imageshack but did not work. Added links instead.

+2  A: 

"Tracking" is a similar term for how tight or loose text is set. You might have better luck googling for that, such as this result.

cowbellemoo
That's interesting. Thanks, I'll check it out. We have a lot of code and we're hoping not to have to replace hundreds of function calls, but there might not be any better choice at the moment. :-/ Certainly I'll add that as a search term on Monday when I return.
Neil Neyman