[Image-SIG] _imagingft clipping problem(?)

Aleksi aleksi at sympatico.ca
Mon Feb 18 16:40:48 CET 2008


Hi there. Semi-newbie question...

I spent the day yesterday getting PIL to run on my OSX 10.3.9 with 
python 2.4. Eventually I figured out that I needed to build the 
_imagingft.so plugin from the freetype2 library, and then the jpeg 
plugins too. (Thank goodness for 
http://wiki.python.org/moin/MacPython/UniversalLibrariesAndExtensions 
!)

After several builds and re-installations I eventually succeeded in 
procedurally rendering text through the ImageFont class. Joy followed.

But the joy quickly waned when I tried to render text using one of my 
specially purchased display fonts. No matter what I tried the top part 
of the text was clipped. I toyed with altering the size in the 
ImageFont core code, but of course that didn't work. It seems the 
problem is the way _imagingft evaluates the metrics of this particular 
font.

The reason I spent the day yesterday jumping through hoops to get this 
to work was to be able to procedurally render text using this 
particular font, only to find out that I can't.

I'm hoping that someone will be able to help steer me towards a 
solution. I looked through the freetype2 source code for a few minutes 
and decided I wouldn't even know where to begin solving the problem 
there. Is there a workaround in PIL, or am I just out of luck until a 
deeper fix is made to the plugin?

Thank you in advance,

Aleksi



More information about the Image-SIG mailing list