Skip to content

Commit 7de2071

Browse files
committed
Moved rcdefaults.py stuff to rcsetup.py
svn path=/trunk/matplotlib/; revision=3491
1 parent a14a4b7 commit 7de2071

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ def validate_int(s):
5353
except ValueError:
5454
raise ValueError('Could not convert "%s" to int' % s)
5555

56+
def validate_psfonttype(s):
57+
'confirm that this is a Postscript font type that we know how to convert to'
58+
fonttype = validate_int(s)
59+
if fonttype not in (3, 42):
60+
raise ValueError('Supported Postscript font types are 3 and 42')
61+
return fonttype
62+
5663
validate_backend = ValidateInStrings('backend',[
5764
'Agg2', 'Agg', 'Aqt', 'Cairo', 'CocoaAgg', 'EMF', 'GD', 'GDK',
5865
'GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'Paint', 'Pdf', 'PS',
@@ -409,6 +416,7 @@ def __call__(self, s):
409416
'ps.useafm' : [False, validate_bool], # Set PYTHONINSPECT
410417
'ps.usedistiller' : [False, validate_ps_distiller], # use ghostscript or xpdf to distill ps output
411418
'ps.distiller.res' : [6000, validate_int], # dpi
419+
'ps.fonttype' : [3, validate_psfonttype], # 3 or 42
412420
'pdf.compression' : [6, validate_int], # compression level from 0 to 9; 0 to disable
413421
'pdf.inheritcolor' : [False, validate_bool], # ignore any color-setting commands from the frontend
414422
'pdf.use14corefonts' : [False, validate_bool], # use only the 14 PDF core fonts

0 commit comments

Comments
 (0)