[reportlab-users] Problem with using TTFont in chart

Robin Becker robin at reportlab.com
Tue Sep 19 11:09:37 EDT 2006


Yura Asyutin wrote:
> Actually, I get errors, when try to use TTFont, while creating chart image.
> Errors occured in reportlab.graphics.RenderPM._setFont() method. I see that
> method supports only Type 1 fonts, using _renderPM.makeT1Font(), when I try
> to use registered font object of TTFont class.
> 
> Could you point me an example of using TTFont in image?
> 
> Thanks.
.......
is it possible _renderPM extension is built without access to freetype2? We use 
freetype2 to handle true type, but it will build OK without freetype2. You then 
cannot do ttf fonts.

A way to tell is

import _renderPM
should_handle_ttf = hasattr(_renderPM,'ft_get_face')

If you don't have that then ttf is out. You need to get access to freetype2 and 
make sure the setup.py script in rl_addons/renderPM knows how to get to it.
-- 
Robin Becker


More information about the reportlab-users mailing list