Revision: 6954
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6954&view=rev
Author:   mdboom
Date:     2009-03-04 18:16:50 +0000 (Wed, 04 Mar 2009)

Log Message:
-----------
Fix a few bugs when mathtext.default is 'regular'

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2009-03-04 13:27:00 UTC (rev 
6953)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2009-03-04 18:16:50 UTC (rev 
6954)
@@ -843,7 +843,7 @@
                 return self.cm_fallback._get_glyph(
                     fontname, 'it', sym, fontsize)
             else:
-                if fontname == 'it' and isinstance(self, StixFonts):
+                if fontname in ('it', 'regular') and isinstance(self, 
StixFonts):
                     return self._get_glyph('rm', font_class, sym, fontsize)
                 warn("Font '%s' does not have a glyph for '%s'" %
                      (fontname, sym.encode('ascii', 'backslashreplace')),
@@ -916,7 +916,7 @@
 
         if mapping is not None:
             if isinstance(mapping, dict):
-                mapping = mapping[font_class]
+                mapping = mapping.get(font_class, 'rm')
 
             # Binary search for the source glyph
             lo = 0


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to