[Image-SIG] TrueType/OpenType rendering bug in PIL 1.1.7?

Anders Sandvig anders.sandvig at gmail.com
Fri Oct 8 00:11:49 CEST 2010


On Thu, Oct 7, 2010 at 9:26 PM, Russell E. Owen <rowen at uw.edu> wrote:
> I created a binary installer for PIL 1.1.7 that is built against
> freetype 2.3.12 (which I believe is the latest) here:
> <http://www.astro.washington.edu/users/rowen/python/>
> but I used all the default build options for freetype; it has a lot of
> options to configure the build and you may wish to look into them.

I see. I tried installing FreeType2 via fink, but couldn't get it to
work. Fink says the install was successful, but I can't find the files
in /sw/lib or /sw/include (and neither can PIL's setup.py). I think a
useful first step would be to find out if the issue is caused by
FreeType2 or PIL, so building FreeType2 from source and tweaking some
options might help with that.

I have also noticed a similar problem when drawing italic or "skewed"
fonts in PhotoShop. When I select the text for editing, the text
renders outside the selection box, just like in my PIL example, so
maybe this is a known issue with TrueType/OpenType fonts?

I'm not sure if the odd rendering affects centering in PS or if it's
just a visual quirk when editing, but in my code it's causing problems
because I want to use the width returned from getsize() to center the
text.


Anders


More information about the Image-SIG mailing list