[reportlab-users] Can't setFont(Times-Roman) missing the T1 files?

Robin Becker reportlab-users@reportlab.com
Sat, 6 Mar 2004 10:15:42 +0000


In article <000201c402c8$5a44ce70$6ac9280a@domw2k.int>, Florian Reiser
<florian.reiser@ra-bc.de> writes
>Hello,
>
>when I try to render a simple HorizontalBarChart with
>renderPM.drawToFile(drawing, 'c:\\temp\\test.png', 'PNG')
>then I get the following error:
>
>Module reportlab.graphics.renderPM, line 546, in drawToString 
>Module reportlab.graphics.renderPM, line 541, in drawToFile 
>Module reportlab.graphics.renderPM, line 527, in drawToPMCanvas 
>Module reportlab.graphics.renderPM, line 50, in draw 
>Module reportlab.graphics.renderPM, line 96, in draw 
>Module reportlab.graphics.renderPM, line 81, in applyState 
>Module reportlab.graphics.renderPM, line 349, in setFont 
>Module reportlab.graphics.renderPM, line 232, in _setFont 
>RenderPMError: Can't setFont(Times-Roman) missing the T1 files? Originally
>exceptions.TypeError: makeT1Font() argument 2 must be string, not None
>(Also, an error occurred while attempting to render the standard error
>message.) 
>
>If I render it with renderPDF.drawToFile(drawing, 'c:\\temp\\test.pdf'),
>then everything works fine.
>
>What am I doing wrong, when using renderPM?
>
>I use reportlab-1.19, python 2.1 on a Windows2000 machine.
>
>Regards
>Florian Reiser
>
.....renderPM needs the standard pfb files from Adobe. I have these in
the adobe resource/fonts dir. Particularly bad error message in that it
doesn't tell you the exact font file we're searching for.
-- 
Robin Becker