Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: imagettftext kerning issue
01-09-2010, 02:55 AM #1
- Join Date
- Dec 2004
- the U.S. of freakin' A.
- Thanked 157 Times in 148 Posts
imagettftext kerning issue
I'm creating some text using imagettftext. All works well with some TTF fonts on my local XAMPP server (running on Windows OS), although I had to adjust the kerning of characters manually by iterating through each character of my string and incrementally increasing the x coordinate (using the text bounding box values returned by imagettftext).
Anyway, it worked fine. Then I moved the code and TTF fonts over to my Linux production server, and the text looks like crap. It appears as if all the work I did to manually insert spacing between characters is negated, and the kerning looks messed up again -- the letters are all scrunched together.
My best guess is that this is either a PHP/GD/FreeType configuration issue or an OS issue (fonts rendering differently on Linux versus MS Windows). Either way, I can't figure out a way to fix the kerning problem on the production server.
I've Googled endlessly for an answer and come up with very little: Found this bug report: http://bugs.php.net/bug.php?id=30652. It doesn't mention kerning, but it suggests fonts are rendered differently on different OS's?
For the record, I'm running PHP v.5.2.11, GD v.2.0.34, and FreeType v.2.2.1. The production server is a commercial web hosting company.
Note: I'm wondering if there is any way to edit the FreeType configuration (as per the linked bug report) on a shared server? Sort of like using one's own php.ini to override the server's PHP configuration...
Any help is appreciated here...I'm completely stuck...Regards, R.J.
Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
[Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
Get free updates about new software version releases, features, and bug fixes!
♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪