Bug report: PIL font management clipping tops of characters

"Bridgman, William T." <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Such as the circle atop the characters: å Å, used in Angstrom.

Sample code & graphic output below.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PIL import Image, ImageFont, ImageDraw

titleFont=ImageFont.truetype('HelveticaBold.ttf',32,encoding='unic')
size=(128,128)
image=Image.new('RGB',size,(0,0,0))
draw=ImageDraw.Draw(image)
teststr=unichr(0x00e5)+unichr(0x00c5)
textsize=draw.textsize(teststr,font=titleFont)
xposition=0
yposition=textsize[1]
draw
.text((xposition,yposition),teststr,font=titleFont,fill=(255,255,255))

image.save('fonttest.tif','TIFF')




Thanks,
Tom
--
Dr. William T."Tom" Bridgman               Scientific Visualization  
Studio
Global Science & Technology, Inc.          NASA/Goddard Space Flight  
Center
Email: [email protected]         Code 610.3
Phone: 301-286-1346                        Greenbelt, MD 20771
FAX:   301-286-1634                        http://svs.gsfc.nasa.gov/

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
fonttest.tif (image/tiff, 48.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.