--- libgd-2.1.0/src/gdft.c.orig 2013-07-03 21:36:41.222081534 +0200 +++ libgd-2.1.0/src/gdft.c 2013-07-04 15:58:51.062639663 +0200 @@ -1217,7 +1217,8 @@ glyph_min.x = penf.x + slot->metrics.horiBearingX; glyph_min.y = penf.y - slot->metrics.horiBearingY; -#if 0 +#if 1 +/* this version of glyph_max.x setting fixes problem with too large bounding box */ if (ch == ' ') { /* special case for trailing space */ glyph_max.x = penf.x + horiAdvance; } else {