[reportlab-users] Font Helvetica always used?

Glenn Linderman v+python at g.nevcal.com
Wed Jun 17 15:55:33 EDT 2015


On 6/17/2015 5:09 AM, Robin Becker wrote:
> If you don't want to mess with the settings overrides then this code 
> at the start of your initial script should do the trick
>
> from reportlab import rl_config
> from reportlab.pdfbase.ttfonts import TTFont
> from reportlab.pdfbase.pdfmetrics import registerFont
> registerFont(TTFont('arial','Arial.ttf'))
> rl_config._SAVED['canvas_basefontname'] = 'arial'
> rl_config._startUp()

So what is the real restriction?  This has to be done before what? 
Before first canvas instantiation, or before other imports, or before 
what, specifically?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20150617/fc7caadf/attachment.html>


More information about the reportlab-users mailing list