[reportlab-users] problems with renderPM.
Ê¿·¼ Íõ
reportlab-users@reportlab.com
Mon, 8 Dec 2003 17:29:16 +0800 (CST)
--0-721162175-1070875756=:6414
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Robin Becker <robin@reportlab.com> wrote:
In article <20031208081232.91004.qmail@web15304.mail.bjs.yahoo.com>,
=?gb2312?q?=CA=BF=B7=BC=20=CD=F5?=
writes
I don't think we support far eastern fonts in renderPM just yet. We have
just gone through trying to get TTF fonts in via freetype 2, but the
structure of fonts other than T1/TTF isn't handled well yet.
> Hi:
>
> ?I want to set the string's fontName as
> 'STSong-Light-GB-EUC-H',but the renderPM have some problems,what
> should I do?
>
> Thanks
>
> ?lt;br>>
> from reportlab.graphics.shapes import *
> from reportlab.graphics import renderPM,renderPDF
> from reportlab.graphics.renderPM import drawToFile
> from reportlab.lib import colors
> d=Drawing(100,100)
> d.add(String(40,40,'ddd',fontSize=10,fontName='STSong-Light-GB-EUC-H'))
> d.add(Line(10,30,40,40))
> renderPM.drawToFile(d,'fff.gif')
>
> ?lt;br>>
> the problems as following:
>
> Warn: Can't find .pfb for face 'STSong-Light'
> Traceback (most recent call last):
> ?File "C:\Documents and Settings\Administrator\ÀÃæ\RR.py", line 9,
> in ?
> ?renderPM.drawToFile(d,'fff.gif')
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 535, in drawToFile
> ?c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL,
> showBoundary=showBoundary)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 521, in drawToPMCanvas
> ?draw(d, c, 0, 0)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 64, in draw
> ?R.draw(drawing, canvas, x, y)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 112, in draw
> ?self.drawNode(drawing)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 127, in drawNode
> ?self.drawNodeDispatcher(node)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderbase.py",
> line 217, in drawNodeDispatcher
> ?self.drawGroup(node)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderbase.py",
> line 241, in drawGroup
> ?self.drawNode(node)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 124, in drawNode
> ?self.push(node)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 82, in push
> ?self.applyState()
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 95, in applyState
> ?self._canvas.setFont(s['fontName'], s['fontSize'])
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 343, in setFont
> ?_setFont(self._gs,fontName,fontSize)
> ?File
> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py",
> line 247, in _setFont
> ?raise RenderPMError, "Can't setFont(%s) missing the T1
> files?\nOriginally %s: %s" % (fontName,s1,s2)
> RenderPMError: Can't setFont(STSong-Light-GB-EUC-H) missing the T1
> files?
> Originally exceptions.AttributeError: CIDEncoding instance has no
> attribute 'vector'
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
--
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
Thank you Robin
I have make .pdf which supporting Chinese ,but I want to convert it to .gif file, or I should make a .gif file which supporting Chinese,what shoule I do?
Thanks agian
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--0-721162175-1070875756=:6414
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit
<DIV>
<DIV><BR><BR><B><I>Robin Becker <robin@reportlab.com></I></B> wrote:
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<P>In article <20031208081232.91004.qmail@web15304.mail.bjs.yahoo.com>,<BR>=?gb2312?q?=CA=BF=B7=BC=20=CD=F5?= <WANGSHIFANG_2008@YAHOO.COM.CN><BR>writes<BR><BR>I don't think we support far eastern fonts in renderPM just yet. We have<BR>just gone through trying to get TTF fonts in via freetype 2, but the<BR>structure of fonts other than T1/TTF isn't handled well yet.<BR>> Hi:<BR>><BR>> ?I want to set the string's fontName as <BR>> 'STSong-Light-GB-EUC-H',but the renderPM have some problems,what <BR>> should I do?<BR>><BR>> Thanks<BR>><BR>> ?lt;br>><BR>> from reportlab.graphics.shapes import *<BR>> from reportlab.graphics import renderPM,renderPDF<BR>> from reportlab.graphics.renderPM import drawToFile<BR>> from reportlab.lib import colors<BR>> d=Drawing(100,100)<BR>> d.add(String(40,40,'ddd',fontSize=10,fontName='STSong-Light-GB-EUC-H'))<BR>> d.add(Line(10,30,40,40))<BR>> renderPM.drawToFile(d,'fff.gif')<BR>><BR>>
?lt;br>><BR>> the problems as following:<BR>><BR>> Warn: Can't find .pfb for face 'STSong-Light'<BR>> Traceback (most recent call last):<BR>> ?File "C:\Documents and Settings\Administrator\ÀÃæ\RR.py", line 9, <BR>> in ?<BR>> ?renderPM.drawToFile(d,'fff.gif')<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 535, in drawToFile<BR>> ?c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL, <BR>> showBoundary=showBoundary)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 521, in drawToPMCanvas<BR>> ?draw(d, c, 0, 0)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 64, in draw<BR>> ?R.draw(drawing, canvas, x, y)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 112, in draw<BR>> ?self.drawNode(drawing)<BR>> ?File <BR>>
"E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 127, in drawNode<BR>> ?self.drawNodeDispatcher(node)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderbase.py", <BR>> line 217, in drawNodeDispatcher<BR>> ?self.drawGroup(node)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderbase.py", <BR>> line 241, in drawGroup<BR>> ?self.drawNode(node)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 124, in drawNode<BR>> ?self.push(node)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 82, in push<BR>> ?self.applyState()<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 95, in applyState<BR>> ?self._canvas.setFont(s['fontName'], s['fontSize'])<BR>> ?File <BR>>
"E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 343, in setFont<BR>> ?_setFont(self._gs,fontName,fontSize)<BR>> ?File <BR>> "E:\PYTHON22\lib\site-packages\reportlab\graphics\renderPM.py", <BR>> line 247, in _setFont<BR>> ?raise RenderPMError, "Can't setFont(%s) missing the T1 <BR>> files?\nOriginally %s: %s" % (fontName,s1,s2)<BR>> RenderPMError: Can't setFont(STSong-Light-GB-EUC-H) missing the T1 <BR>> files?<BR>> Originally exceptions.AttributeError: CIDEncoding instance has no <BR>> attribute 'vector'<BR>><BR>> __________________________________________________<BR>> Do You Yahoo!?<BR>> Tired of spam? Yahoo! Mail has the best spam protection around <BR>> http://mail.yahoo.com <BR><BR>-- <BR>Robin Becker<BR>_______________________________________________<BR>reportlab-users mailing list<BR>reportlab-users@reportlab.com<BR><A
href="http://two.pairlist.net/mailman/listinfo/reportlab-users">http://two.pairlist.net/mailman/listinfo/reportlab-users</A></P>
<P>Thank you Robin</P>
<P>I have make .pdf which supporting Chinese ,but I want to convert it to .gif file, or I should make a .gif file which supporting Chinese,what shoule I do?</P>
<P>Thanks agian</P></BLOCKQUOTE></DIV></DIV><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com
--0-721162175-1070875756=:6414--