Revision: 7014
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7014&view=rev
Author: mdboom
Date: 2009-03-31 14:50:12 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Remove some global caches in order to remove a theoretical threading problem.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/mathtext.py
Modified: branches/v0_98_5_maint/lib/matplotlib/mathtext.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/mathtext.py 2009-03-30 22:57:31 UTC
(rev 7013)
+++ branches/v0_98_5_maint/lib/matplotlib/mathtext.py 2009-03-31 14:50:12 UTC
(rev 7014)
@@ -652,17 +652,16 @@
'sf' : 'cmss10',
'ex' : 'cmex10'
}
- fontmap = {}
def __init__(self, *args, **kwargs):
self._stix_fallback = StixFonts(*args, **kwargs)
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for key, val in self._fontmap.iteritems():
- fullpath = findfont(val)
- self.fontmap[key] = fullpath
- self.fontmap[val] = fullpath
+ self.fontmap = {}
+ for key, val in self._fontmap.iteritems():
+ fullpath = findfont(val)
+ self.fontmap[key] = fullpath
+ self.fontmap[val] = fullpath
_slanted_symbols = set(r"\int \oint".split())
@@ -764,7 +763,6 @@
This class will "fallback" on the Bakoma fonts when a required
symbol can not be found in the font.
"""
- fontmap = {}
use_cmex = True
def __init__(self, *args, **kwargs):
@@ -774,14 +772,14 @@
else:
self.cm_fallback = None
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for texfont in "cal rm tt it bf sf".split():
- prop = rcParams['mathtext.' + texfont]
- font = findfont(prop)
- self.fontmap[texfont] = font
- prop = FontProperties('cmex10')
+ self.fontmap = {}
+ for texfont in "cal rm tt it bf sf".split():
+ prop = rcParams['mathtext.' + texfont]
font = findfont(prop)
- self.fontmap['ex'] = font
+ self.fontmap[texfont] = font
+ prop = FontProperties('cmex10')
+ font = findfont(prop)
+ self.fontmap['ex'] = font
_slanted_symbols = set(r"\int \oint".split())
@@ -890,18 +888,17 @@
4 : 'STIXSize4',
5 : 'STIXSize5'
}
- fontmap = {}
use_cmex = False
cm_fallback = False
_sans = False
def __init__(self, *args, **kwargs):
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for key, name in self._fontmap.iteritems():
- fullpath = findfont(name)
- self.fontmap[key] = fullpath
- self.fontmap[name] = fullpath
+ self.fontmap = {}
+ for key, name in self._fontmap.iteritems():
+ fullpath = findfont(name)
+ self.fontmap[key] = fullpath
+ self.fontmap[name] = fullpath
def _map_virtual_font(self, fontname, font_class, uniindex):
# Handle these "fonts" that are actually embedded in
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins