[reportlab-users] Using Mac and TrueType fonts with renderPM
Ka-Ping Yee
reportlab at zesty.ca
Sun Jan 7 22:17:41 EST 2007
On Mon, 8 Jan 2007, Andy Robinson wrote:
> I'm pretty sure you don't need a Type 1 font to render a TrueType one;
> my colleague Robin should be able to verify what's needed tomorrow or on
> Tuesday - I don't have access to a Mac at the moment.
It looks like you don't need the Type 1 font for pdfgen, but you do
need it for renderPM.
>
> Can you execute reportlab\graphics\renderPM.py
This fails with the message:
Warn: Can't find .pfb for face 'Times-Roman'
The traceback is:
Traceback (most recent call last):
File "graphics/renderPM.py", line 663, in <module>
test()
File "graphics/renderPM.py", line 643, in test
drawToFile(drawing,fullpath,fmt=k)
File "graphics/renderPM.py", line 591, in drawToFile
c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL, showBoundary=showBoundary)
File "graphics/renderPM.py", line 577, in drawToPMCanvas
draw(d, c, 0, 0, showBoundary=showBoundary)
File "graphics/renderPM.py", line 49, in draw
R.draw(renderScaledDrawing(drawing), canvas, x, y, showBoundary=showBoundary)
File "/usr/local/lib/python2.5/site-packages/reportlab/graphics/renderbase.py", line 200, in draw
self.initState(x,y) #this is the push()
File "graphics/renderPM.py", line 86, in initState
self.applyState()
File "graphics/renderPM.py", line 80, in applyState
self._canvas.setFont(s['fontName'], s['fontSize'])
File "graphics/renderPM.py", line 358, in setFont
_setFont(self._gs,fontName,fontSize)
File "graphics/renderPM.py", line 238, in _setFont
raise RenderPMError, "Can't setFont(%s) missing the T1 files?\nOriginally %s: %s" % (fontName,s1,s2)
__main__.RenderPMError: Can't setFont(Times-Roman) missing the T1 files?
Originally <type 'exceptions.TypeError'>: makeT1Font() argument 2 must be string, not None
See this:
http://bioinf.scri.ac.uk/lp/downloads/programs/genomediagram/renderPM_help.txt
If i download pfbfer.zip and unpack it it in an appropriate place,
then renderPM.py generates five images and then stops because i
don't have the rlextra package.
-- ?!ng
More information about the reportlab-users
mailing list