[reportlab-users] suggestion for fonts

Andy Robinson reportlab-users@reportlab.com
Fri, 9 Jul 2004 00:29:56 +0100


> -----Original Message-----
> From: reportlab-users-admin@reportlab.com
> [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Jerome Alet
> Sent: 08 July 2004 23:49
> To: reportlab-users@reportlab.com
> Subject: [reportlab-users] suggestion for fonts
> 
> 
> Hi there,
> 
> would it be possible to add "~/fonts" or something like that
> (and expand it at run time of course) to the list of path
> automatically searched for fonts, in a future release ?
> 
> (~/rlfonts would do it as well)

Sensible, I just added this in.  It will look for './fonts' in the 
current directory whenever reportlab is first imported.  Our
standard approach checks to see if lots of possible directories
exist, and only existing ones end up on the path, so this is cheap.

You do know that we already search for such a directory parallel
to where reportlab is installed?  When doing web server installs
(rather than system-wide ones in site-packages), our customers
usually have a copy of reportlab there, and just add their preferred 
fonts in alongside e.g.

  somewhere/cgi-bin   #kickoff scripts cd into application1 and exec
  somewhere/htdocs
  somewhere/fonts
  somewhere/application1
  somewhere/application2
  somewhere/reportlab

Also look in reportlab/rl_config.py
T1SearchPath =  (
   		# stuff omitted
                '%(REPORTLAB_DIR)s/fonts',              #special
                '%(REPORTLAB_DIR)s/../fonts',           #special
                '%(REPORTLAB_DIR)s/../../fonts',        #special
                 )