[reportlab-users] 2 pbs : TrueType difficulties and transparency setting

Robin Becker robin at reportlab.com
Mon Mar 14 14:12:09 EST 2005

Webmaster wrote:
> Hi there,
> I'm running a python 2.4, debian box, PIL, freetype2, and reportlab 
> installed OK from source.
> 1/ TT
> TT Fonts are in dirs declared in rl_config.py
> tried to run renderPM like a test of testshapes.py
> I understood renderPM checks _renderPM.do for ft_get_face to run test13 
> demonstrating TT usage.
> I can't manage to have this test run.

have you tried hand simulating the check


import _renderPM
print hasattr(_renderPM,'ft_get_face')

> 2/ transparency
> still in the testshapes series, I can't manage to have a gif or png with 
> transparent background. I read mail archives about setting a transparent 
> entry in the pil_config dictionnary, but it didn't help.
> any help, idea, pointer to more ressource is very welcome
..... this is certainly possible, although it doesn't work with jpeg as 
yet. If renderPM is working properly then there's a test in 
reportlab/test/test_pdfgen_general.py of using the mask parameter. Note 
that renderPM doesn't make images with transparent colours. That's 
something that PIL can do. It might be possible to get renderPM to pass 
special arguments through to the back end (ie PIL), but it doesn't do 
very much yet.
Robin Becker

More information about the reportlab-users mailing list