[Image-SIG] text render quality (jpg attached)

Scott Frankel leknarf at pacbell.net
Tue Nov 27 19:44:03 CET 2007


One more question about text:  Is there a way to increase text render  
quality?

I haven't seen any hinting, anti-aliasing, or quality settings in the  
documentation for font objects.  Are there any tricks for cheating  
better quality out of text renders?

I'm attaching an image with a PIL text render on the left and a Shake  
text render on the right.  They both use the same font.  Here's my  
PIL code:

import Image
from PIL import Image
import ImageFont
img = Image.new("RGB", (512, 256), (128, 128, 128))
import ImageDraw
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("/Library/Fonts/HelveticaNeue.dfont", 24,  
encoding="armn")
draw.text((10, 10), "hello world", font=font)
img.save("foo.jpg", "JPEG")


Thanks!
Scott



-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.001.jpg
Type: image/jpeg
Size: 4490 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20071127/6c0292bb/attachment.jpg 
-------------- next part --------------



More information about the Image-SIG mailing list