Revision: 6212 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6212&view=rev Author: mdboom Date: 2008-10-15 18:35:57 +0000 (Wed, 15 Oct 2008)
Log Message: ----------- Fix over-zealous caching in mathtext that causes one plot's font settings to affect the next. (This resulted in bold tick labels in log_demo.py when building the docs). Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mathtext.py Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-10-15 17:54:38 UTC (rev 6211) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-10-15 18:35:57 UTC (rev 6212) @@ -565,8 +565,6 @@ A generic base class for all font setups that use Truetype fonts (through ft2font) """ - _fonts = {} - class CachedFont: def __init__(self, font): self.font = font @@ -579,14 +577,13 @@ def __init__(self, default_font_prop, mathtext_backend): Fonts.__init__(self, default_font_prop, mathtext_backend) - self.glyphd = {} + self.glyphd = {} + self._fonts = {} - if self._fonts == {}: - filename = findfont(default_font_prop) - default_font = self.CachedFont(FT2Font(str(filename))) + filename = findfont(default_font_prop) + default_font = self.CachedFont(FT2Font(str(filename))) + self._fonts['default'] = default_font - self._fonts['default'] = default_font - def destroy(self): self.glyphd = None Fonts.destroy(self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins