Index: lib/matplotlib/_mathtext_data.py
===================================================================
RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/_mathtext_data.py,v
retrieving revision 1.8
diff -r1.8 _mathtext_data.py
665a666,756
> 
> latex_to_standard = {
>     r'\cong'            : ('psyr', 64),
>     r'\Delta'           : ('psyr', 68),
>     r'\Phi'             : ('psyr', 70),
>     r'\Gamma'           : ('psyr', 89),
>     r'\alpha'           : ('psyr', 97),
>     r'\beta'            : ('psyr', 98),
>     r'\chi'             : ('psyr', 99),
>     r'\delta'           : ('psyr', 100),
>     r'\varepsilon'      : ('psyr', 101),
>     r'\phi'             : ('psyr', 102),
>     r'\gamma'           : ('psyr', 103),
>     r'\eta'             : ('psyr', 104),
>     r'\iota'            : ('psyr', 105),
>     r'\varpsi'          : ('psyr', 106),
>     r'\kappa'           : ('psyr', 108),
>     r'\nu'              : ('psyr', 110),
>     r'\pi'              : ('psyr', 112),
>     r'\theta'           : ('psyr', 113),
>     r'\rho'             : ('psyr', 114),
>     r'\sigma'           : ('psyr', 115),
>     r'\tau'             : ('psyr', 116),
>     r'\upsilon'         : ('psyr', 117),
>     r'\varpi'           : ('psyr', 118),
>     r'\omega'           : ('psyr', 119),
>     r'\xi'              : ('psyr', 120),
>     r'\psi'             : ('psyr', 121),
>     r'\zeta'            : ('psyr', 122),
>     r'\sim'             : ('psyr', 126),
>     r'\leq'             : ('psyr', 163),
>     r'\infty'           : ('psyr', 165),
>     r'\clubsuit'        : ('psyr', 167),
>     r'\diamondsuit'     : ('psyr', 168),
>     r'\heartsuit'       : ('psyr', 169),
>     r'\spadesuit'       : ('psyr', 170),
>     r'\leftrightarrow'  : ('psyr', 171),
>     r'\leftarrow'       : ('psyr', 172),
>     r'\uparrow'         : ('psyr', 173),
>     r'\rightarrow'      : ('psyr', 174),
>     r'\downarrow'       : ('psyr', 175),
>     r'\pm'              : ('psyr', 176),
>     r'\geq'             : ('psyr', 179),
>     r'\times'           : ('psyr', 180),
>     r'\propto'          : ('psyr', 181),
>     r'\partial'         : ('psyr', 182),
>     r'\bullet'          : ('psyr', 183),
>     r'\div'             : ('psyr', 184),
>     r'\neq'             : ('psyr', 185),
>     r'\equiv'           : ('psyr', 186),
>     r'\approx'          : ('psyr', 187),
>     r'\ldots'           : ('psyr', 188),
>     r'\aleph'           : ('psyr', 192),
>     r'\Im'              : ('psyr', 193),
>     r'\Re'              : ('psyr', 194),
>     r'\wp'              : ('psyr', 195),
>     r'\otimes'          : ('psyr', 196),
>     r'\oplus'           : ('psyr', 197),
>     r'\oslash'          : ('psyr', 198),
>     r'\cap'             : ('psyr', 199),
>     r'\cup'             : ('psyr', 200),
>     r'\supset'          : ('psyr', 201),
>     r'\supseteq'        : ('psyr', 202),
>     r'\subset'          : ('psyr', 204),
>     r'\subseteq'        : ('psyr', 205),
>     r'\in'              : ('psyr', 206),
>     r'\notin'           : ('psyr', 207),
>     r'\angle'           : ('psyr', 208),
>     r'\nabla'           : ('psyr', 209),
>     r'\textregistered'  : ('psyr', 210),
>     r'\copyright'       : ('psyr', 211),
>     r'\texttrademark'   : ('psyr', 212),
>     r'\Pi'              : ('psyr', 213),
>     r'\prod'            : ('psyr', 213),
>     r'\surd'            : ('psyr', 214),
>     r'\sqrt'            : ('psyr', 214),
>     r'\cdot'            : ('psyr', 215),
>     r'\urcorner'        : ('psyr', 216),
>     r'\vee'             : ('psyr', 217),
>     r'\wedge'           : ('psyr', 218),
>     r'\Leftrightarrow'  : ('psyr', 219),
>     r'\Leftarrow'       : ('psyr', 220),
>     r'\Uparrow'         : ('psyr', 221),
>     r'\Rightarrow'      : ('psyr', 222),
>     r'\Downarrow'       : ('psyr', 223),
>     r'\Diamond'         : ('psyr', 224),
>     r'\langle'          : ('psyr', 225),
>     r'\Sigma'           : ('psyr', 229),
>     r'\sum'             : ('psyr', 229),
> 
> }
Index: lib/matplotlib/font_manager.py
===================================================================
RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/font_manager.py,v
retrieving revision 1.25
diff -r1.25 font_manager.py
902,903c902
<                 afmpath = os.environ.get('HOME', get_data_path())
<                 afmcache = os.path.join(afmpath, '.afmfont.cache')
---
>                 afmcache = os.path.join(get_configdir(), '.afmfont.cache')
Index: lib/matplotlib/mathtext.py
===================================================================
RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/mathtext.py,v
retrieving revision 1.20
diff -r1.20 mathtext.py
144c144,145
< from matplotlib._mathtext_data import latex_to_bakoma, cmkern
---
> from matplotlib._mathtext_data import latex_to_bakoma, cmkern, \
>         latex_to_standard
146c147
< from matplotlib import get_data_path
---
> from matplotlib import get_data_path, rcParams
608a610,698
> 
> class StandardPSFonts(Fonts):
>     """
>     Use the standard postscript fonts for rendering to backend_ps
>     """
>     fnames = ('psyr', 'ptmri8a', 'pcrr8a', 'ptmr8a', 'pzcmi8a')
>     # allocate a new set of fonts
>     basepath = get_data_path()
>     
>     fontmap = { 'cal' : 'pzcmi8a',
>                 'rm'  : 'ptmr8a',
>                 'tt'  : 'pcrr8a',
>                 'it'  : 'ptmri8a',
>                 None  : 'ptmri8a',
>                 }
> 
>     def __init__(self):
>         self.glyphd = {}
>         self.fonts = dict(
>             [ (name, AFM(file(os.path.join(self.basepath, name) + '.afm')))
>               for name in self.fnames])
> 
>     def _get_info (self, font, sym, fontsize, dpi):
>         'load the cmfont, metrics and glyph with caching'
>         key = font, sym, fontsize, dpi
>         tup = self.glyphd.get(key)
> 
>         if tup is not None:
>             return tup
> 
>         basename = self.fontmap[font]
> 
>         if latex_to_standard.has_key(sym):
>             basename, num = latex_to_standard[sym]
>             char = chr(num)
>         elif len(sym) == 1:
>             char = sym
>         else:
>             raise ValueError('unrecognized symbol "%s"' % (sym))
> 
>         try:
>             sym = self.fonts[basename].get_name_char(char)
>         except KeyError:
>             raise ValueError('unrecognized symbol "%s"' % (sym))
> 
>         offset = 0
>         cmfont = self.fonts[basename]
>         basename = cmfont.get_fontname()
>         
>         xmin, ymin, xmax, ymax = [val / 64.0
>                                   for val in cmfont.get_bbox_char(char)]
>         metrics = Bunch(
>             advance  = (cmfont.get_kern_dist(']', char) / 65536.0
>                         + (xmax-xmin)),
>             width    = cmfont.get_width_char(char) / 64.0,
>             height   = cmfont.get_width_char(char) / 64.0,
>             xmin = xmin,
>             xmax = xmax,
>             ymin = ymin+offset,
>             ymax = ymax+offset
>             )
> 
>         self.glyphd[key] = basename, metrics, sym, offset
>         return basename, metrics, '/'+sym, offset
> 
>     def set_canvas_size(self, w, h, pswriter):
>         'Dimension the drawing canvas; may be a noop'
>         self.width  = w
>         self.height = h
>         self.pswriter = pswriter
> 
> 
>     def render(self, ox, oy, font, sym, fontsize, dpi):
>         fontname, metrics, glyphname, offset = \
>                 self._get_info(font, sym, fontsize, dpi)
>         ps = """/%(fontname)s findfont
> %(fontsize)s scalefont
> setfont
> %(ox)f %(oy)f moveto
> /%(glyphname)s glyphshow
> """ % locals()
>         self.pswriter.write(ps)
> 
> 
>     def get_metrics(self, font, sym, fontsize, dpi):
>         basename, metrics, sym, offset  = \
>                 self._get_info(font, sym, fontsize, dpi) 
>         return metrics
> 
1308,1309c1398,1403
<     bakomaFonts = BakomaPSFonts()
<     Element.fonts = bakomaFonts
---
>     if rcParams['ps.useafm']:
>         standardFonts = StandardPSFonts()
>         Element.fonts = standardFonts
>     else:
>         bakomaFonts = BakomaPSFonts()
>         Element.fonts = bakomaFonts
Index: lib/matplotlib/backends/backend_ps.py
===================================================================
RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/backends/backend_ps.py,v
retrieving revision 1.67
diff -r1.67 backend_ps.py
213a214,218
>         if ismath:
>             width, height, pswriter = math_parse_s_ps(
>                 s, 72, prop.get_size_in_points())
>             return width, height
> 
224,229d228
<             
<         if ismath:
<             width, height, pswriter = math_parse_s_ps(
<                 s, 72, prop.get_size_in_points())
<             return width, height
< 
613c612,618
<         if rcParams['ps.useafm']:
---
>         if ismath=='TeX':
>             return self.tex(gc, x, y, s, prop, angle)
> 
>         elif ismath:
>             return self.draw_mathtext(gc, x, y, s, prop, angle)
> 
>         elif rcParams['ps.useafm']:
648,653d652
<         elif ismath=='TeX':
<             return self.tex(gc, x, y, s, prop, angle)
< 
<         elif ismath:
<             return self.draw_mathtext(gc, x, y, s, prop, angle)
< 
