[reportlab-users] Unicode use with reportlab

Marco Bizzarri m.bizzarri at icube.it
Mon Jan 24 10:19:45 EST 2005


Andy Robinson wrote:
>>Hi Andy.
>>
>>Thank you for your quick answer. Now two others:
>>
>>What are the TrueType fonts available on ReportLab on Linux to use? 
> 
> 
> I have no idea, I don't use Linux.  I do know that .ttf 
> files copied from Windows machines seem to work fine
> on a variety of Unix servers.  We ship a rina.ttf which should
> already be on the font search path for testing...
> 
> 
>>And how can I select them from reportlab?
> 
> 
> See section 3.6 of our user guide, but here's the summary:
> 
> from reportlab.pdfbase import pdfmetrics
> from reportlab.pdfbase.ttfonts import TTFont
> pdfmetrics.registerFont(TTFont('Rina', 'rina.ttf'))
> canvas.setFont(Rina, 32)
> canvas.drawString(10, 150, "Some text encoded in UTF-8")
> canvas.drawString(10, 100, "In the Rina TT Font!")
> 
> Hope this helps,
> 
> Andy
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users

Ok, thanks a lot, I was able to do that with Vera font...



Regards
Marco



More information about the reportlab-users mailing list