[reportlab-users] renderPM in 1.1.9
Robin Becker
reportlab-users@reportlab.com
Thu, 29 Jan 2004 11:30:11 +0000
In article <20040129091052.82034.qmail@web15213.mail.bjs.yahoo.com>,
=?gb2312?q?=FFffffca=FFffffbf=FFffffb7=FFffffbc=20=FFffffcd=FFfffff5?=
<wangshifang_2008@yahoo.com.cn> writes
Can you try the following
python -c "import _renderPM;print _renderPM._version,_renderPM.__file__"
If it doesn't report 0.98 then you should get the latest version from
http://www.reportlab.com/ftp/win32-dlls/2.3/_renderPM.pyd
The latest file size is around 421kilo bytes. Replace _renderPM.pyd with
the latest version. If you want to build _renderPM.pyd yourself you need
to get a recent copy of freetype2 as well and build that, then alter
renderPM's setup.py to point to the freetype2 location.
> Hi:
>
> I have modified it,but it still can't work:
>
> from reportlab import *
> from reportlab.graphics import renderPM
> from reportlab.pdfbase import pdfmetrics
> from reportlab.pdfbase.ttfonts import TTFont
> pdfmetrics.registerFont(TTFont('GOTHIC',
> 'c:\\winnt\\fonts\\gothic.ttf'))
> from reportlab.lib import colors
> from reportlab.graphics.shapes import *
> d = Drawing(400,200)
> d.add(Rect(50,50,300,100, fillColor=colors.yellow))
> d.add(String(30,50,'jjj',fontName='GOTHIC'))
> renderPM.drawToFile(d, 'out.jpg', 'JPG')
>
>
>
> resualt:
>
> RenderPMError: Can't setFont(GOTHIC) missing the T1 files?
> Originally exceptions.AttributeError: TTFontFace instance has no
> attribute 'findT1File'
>
>
>
> Is that it only searching for T1 font?
>
>
>
> Thanks
>
>
>
>
>
>
>
> Do You Yahoo!?
--
Robin Becker