Possible character spacing bug in gd library

I think that I may have discovered a bug in character spacing that was introduced somewhere in between gd versions 2.0.28 and 2.0.33. This bug is not present in the gd bundled with PHP, which I am told by Rasmus is some kind of patched version of gd 2.0.23.

standalone gd-2.0.33

gd bundled with PHP or gd-2.0.28

Observe how the character spacing is jacked so that words like “Spain” end up looking like “Sp ain”. Something happened with the vertical spacing as well.

This is on FreeBSD with freetype2-2.1.10. Font is 9 point verdana bold:

-r--r--r--  1 root  wheel  136032 Dec 30  2003 /usr/X11R6/lib/X11/fonts/webfonts/verdanab.ttf
MD5 (/usr/X11R6/lib/X11/fonts/webfonts/verdanab.ttf) = a2b4dc9afc18e76cfcaa0071fa7cd0da

I’m going to report this at http://www.boutell.com/contact/.

Leave a Reply

Your email address will not be published. Required fields are marked *