#copyright ReportLab Inc. 2000-2001
#see license.txt for license details
#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab
#$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.16 2001/08/07 15:40:44 rgbecker Exp $
import sys, string
from reportlab.lib import pagesizes

def _setOpt(name, value, conv=None):
	'''set a module level value from environ/default'''
	from os import environ
	ename = 'RL_'+name
	if environ.has_key(ename):
		value = environ[ename]
	if conv: value = conv(value)
	globals()[name] = value

sys_version = string.split(sys.version)[0]		#strip off the other garbage

def	_startUp():
	'''this function allows easy resetting to the global defaults'''
	############################################################
	# If the environment contains 'RL_xxx' then we use the value
	# else we use the given default
	_setOpt('shapeChecking', 1, int)
	_setOpt('defaultEncoding', 'WinAnsiEncoding')							# 'WinAnsi' or 'MacRoman'
	_setOpt('pageCompression',1,int)										#the default page compression mode
	_setOpt('defaultPageSize','A4',lambda v,M=pagesizes: getattr(M,v))		#check in reportlab/lib/pagesizes
	_setOpt('defaultImageCaching',0,int)			#set to zero to remove those annoying cached images
	_setOpt('PIL_WARNINGS',1,int)					#set to zero to remove those annoying warnings
	_setOpt('ZLIB_WARNINGS',1,int)
	_setOpt('warnOnMissingFontGlyphs',1,int)		# if 1, warns of each missing glyph
	_setOpt('_verbose',0,int)

	#places to search for Type 1 Font files
	if sys.platform=='win32':
		T1SearchPath=['c:\\Program Files\\Adobe\\Acrobat 4.0\\Resource\\Font']
	elif sys.platform in ('linux2','freebsd4',):
		T1SearchPath=['/usr/lib/Acrobat4/Resource/Font']
	elif sys.platform=='mac':	# we must be able to do better than this
		import os
		diskName = string.split(os.getcwd(), ':')[0]
		fontDir = diskName + ':Applications:Python %s:reportlab:fonts' % sys_version
		T1SearchPath = [fontDir]   # tba
		PIL_WARNINGS = 0 # PIL is not packagized in the Mac Python build
	else:
		T1SearchPath=[]
		#raise ValueError, 'Please add a proper T1SearchPath for your system to rl_config.py'
	_setOpt('T1SearchPath',T1SearchPath)

_startUp()

@@ -219,9 +219,9 @@
  1.1
-6
+7
  200
@@ -229,19 +229,19 @@
 /08/
-07 15:40:44
+22 12:14:55
  rgb
@@ -258,16 +258,20 @@
 $%0Aimport
+ os,
  sys, st
@@ -1545,29 +1545,20 @@
 n32':%0A%09%09
-T1SearchPath=
+S = 
 %5B'c:%5C%5CPr
@@ -1655,29 +1655,20 @@
 4',):%0A%09%09
-T1SearchPath=
+S = 
 %5B'/usr/l
@@ -1767,20 +1767,8 @@
 his%0A
-%09%09import os%0A
 %09%09di
@@ -1891,28 +1891,17 @@
 rsion%0A%09%09
-T1SearchPath
+S
  = %5Bfont
@@ -1989,28 +1989,17 @@
 else:%0A%09%09
-T1SearchPath
+S
 =%5B%5D%0A%09%09#r
@@ -2087,31 +2087,155 @@
 y'%0A%09
-_setOpt('T1SearchPath',
+S.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'lib','fontDir')))%0A%09P=%5B%5D%0A%09for p in S:%0A%09%09if os.path.isdir(p): P.append(p)%0A%09_setOpt('
 T1Se
@@ -2242,16 +2242,19 @@
 archPath
+',P
 )%0A%0A_star

Allow RL private T1 fontDir