[reportlab-users] renderPM in 1.1.9

ÿffffcaÿffffbfÿffffb7ÿffffbc ÿffffcdÿfffff5 reportlab-users@reportlab.com
Thu, 29 Jan 2004 17:10:52 +0800 (CST)


--0-1387498118-1075367452=:81817
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit

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!?
·±»ªÊÀ½çÀÈÃÎÒ¿´ÇåÄã
--0-1387498118-1075367452=:81817
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit

<DIV>Hi:</DIV>
<DIV>&nbsp; I have modified it,but it still can't work:</DIV>
<DIV>from reportlab&nbsp; import *<BR>from reportlab.graphics import renderPM<BR>from reportlab.pdfbase import pdfmetrics<BR>from reportlab.pdfbase.ttfonts import TTFont<BR>pdfmetrics.registerFont(TTFont('GOTHIC', 'c:\\winnt\\fonts\\gothic.ttf'))<BR>from reportlab.lib import colors<BR>from reportlab.graphics.shapes import *<BR>d = Drawing(400,200)<BR>d.add(Rect(50,50,300,100, fillColor=colors.yellow))<BR>d.add(String(30,50,'jjj',fontName='GOTHIC'))<BR>renderPM.drawToFile(d, 'out.jpg', 'JPG')</DIV>
<DIV>&nbsp;</DIV>
<DIV>resualt:</DIV>
<DIV>RenderPMError: Can't setFont(GOTHIC) missing the T1 files?<BR>Originally exceptions.AttributeError: TTFontFace instance has no attribute 'findT1File'</DIV>
<DIV>&nbsp;</DIV>
<DIV>Is that it only searching for&nbsp;T1 font?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV><BR>&nbsp;</DIV>
<DIV>&nbsp;</DIV><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_dec2003" target=blank>·±»ªÊÀ½çÀÈÃÎÒ¿´ÇåÄã</a>
--0-1387498118-1075367452=:81817--