This image was created with PIL. See how the g\'s and the y\'s are cut off in this image? How can I prevent this?
http://img109.imageshack.us/img109/8874/screenshote
The "bug" still exists in 2012, with Ubuntu 11.10. Fontsize 11, 12, 13 and 15 clip the underscore completely.
#!/usr/bin/env python
""" demonstrates clipping of descenders for certain font sizes """
import Image, ImageDraw, ImageFont
fontPath = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf"
im = Image.new('L', (256, 256))
ys=15
for i in range(10,21):
fh = ImageFont.truetype(fontPath, i)
sometext="%dgt_}" % (i)
ImageDraw.Draw(im).text((10, ys ),sometext , 254, fh)
ys+=i+5
im.show()