I post this here in the hope that this saves you some headache.
GD/Freetype is widely used on the LAMP stack to render custom fonts for web applications. The problem is, it often happens that even the same configuration produces different results on different servers. So even if you check that you have the same version of GD and Freetype and the very same fonts installed on different servers, you cannot be 100% sure that you'll get the same results concerning anti-aliasing, letter spacing and kerning.
What makes it worse: If you're used to the joy of using a package manager on your preferred system you really want to avoid the horror of building PHP from source and then maintaining it.
To come to the point: What I had to find out the hard way — it's not sufficient just to check your version of GD and Freetype. Both could be compiled with different settings on your platform and this is hardly documented. And now the important point: Independent of that, different versions of PHP itself deliver (undocumented) different results for the relevant functions imagettftext and imagettfbbox. From the POV of a graphics artist this is simply unacceptable. Think Photoshop CS2 or 3 would render the same font completely different.
And the actual important tip: If you rely on font-rendering, don't think of using the latest PHP versions 5.2.13 or 5.3.2. It completely messes up letter spacing. Stick with 5.2.11 at the moment! (Look here for a discussion on the topic:
http://bugs.php.net/bug.php?id=51207)
If you're on debian I'd recommend using the archived packages from
http://archives.dotdeb.org/