|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50958 imagettftext() Kerning errors
Submitted: 2010-02-07 23:42 UTC Modified: 2010-02-08 02:32 UTC
From: sks76543210 at gmail dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.3SVN-2010-02-07 (snap) OS: CentOS 5
Private report: No CVE-ID: None
 [2010-02-07 23:42 UTC] sks76543210 at gmail dot com
Text created with imagettftext() has kerning (letter-spacing) errors

Reproduce code:
Please see for example images, fonts used, and sample php script. Entire test case is tar'ed at

In PHP 5.1.6, with GD version "bundled (2.0.28 compatible)", the test images did not have any kerning errors.

In the php5.3-201002071530 snapshot with GD version "bundled (2.0.34 compatible)", the text on the images is not displayed properly, especially evident in but there are less noticeable errors in as well.

Expected result:
imagettftext() should continue displaying text as it did in PHP 5.1.6 with GD 2.0.28

Actual result:
imagettftext() has kerning errors making the text completely illegible in some cases


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-07 23:51 UTC] sks76543210 at gmail dot com
My Apologies, this may be a duplicate of
 [2010-02-08 02:32 UTC]
It does indeed look like the same issue. Dupeing.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 21:01:27 2024 UTC