[Image-SIG] TrueType fonts under PIL

goat at tirfa.com goat at tirfa.com
Tue Feb 13 03:21:29 CET 2007

I have been writing a python script that automatically makes button  
images from text files and I have some questions about the TrueType  
font rendering in PIL 1.1.6 under Python 2.5 under Win32 (used the  

I have been having some issues with glyphs either not rendering  
completely or not rendering at all(the ones that I have noticed are  
'_' and the descender (http://en.wikipedia.org/wiki/Descender) for  
lower case 'g'). After some playing around, I found that this seems to  
be mostly dependent on font size. Depending on which font I use, the  
size at which everything renders correctly changes but they render  
correctly at some sizes and don't when I use other sizes.

Does anyone have any suggestions on what I can do to improve TrueType  
font rendering without changing the font size?

Thanks for your time,


Environment Information:
Windows XP SP2
Python 2.5 (.msi version from python.org)
PIL 1.1.6 (downloaded .msi for python 2.5)

Font: I've tried several, but the one that I have been using most is  
IPA Mona Gothic (ipag-mona.ttf) which is a Japanese language font  
available from http://www.geocities.jp/ipa_mona/ and I believe that it  
is used in several FOSS projects.

More information about the Image-SIG mailing list