SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

Revision: 3608
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3608&view=rev
Author: dsdale
Date: 2007年07月24日 09:24:03 -0700 (2007年7月24日)
Log Message:
-----------
fixed a bug in texmanager's font configuration, changed a warning to a 
verbose report
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/texmanager.py
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py	2007年07月22日 20:03:45 UTC (rev 3607)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py	2007年07月24日 16:24:03 UTC (rev 3608)
@@ -120,23 +120,27 @@
 if ff in self.font_families:
 self.font_family = ff
 else:
- warnings.warn('The %s font family is not compatible with LaTeX. serif will be used by default.' % ff)
+ mpl.verbose.report('The %s font family is not compatible with LaTeX. serif will be used by default.' % ff, 'helpful')
 self.font_family = 'serif'
 
 fontconfig = [self.font_family]
 for font_family, font_family_attr in \
 ((ff, ff.replace('-', '_')) for ff in self.font_families):
 for font in rcParams['font.'+font_family]:
- if DEBUG: print 'family: %s, font: %s, info: %s'%(font_family,
- font, self.font_info[font.lower()])
 if font.lower() in self.font_info:
+ found_font = self.font_info[font.lower()]
 setattr(self, font_family_attr,
 self.font_info[font.lower()])
+ if DEBUG: 
+ print 'family: %s, font: %s, info: %s'%(font_family,
+ font, self.font_info[font.lower()])
 break
 else:
- warnings.warn('No LaTeX-compatible font found for the %s font family in rcParams. Using default.' % ff)
- setattr(self, font_family_attr, font_family)
- fontconfig.append(getattr(self, font_family_attr)[0])
+ if DEBUG: print '$s font is not compatible with usetex'
+ else:
+ mpl.verbose.report('No LaTeX-compatible font found for the %s font family in rcParams. Using default.' % ff, 'helpful')
+ setattr(self, font_family_attr, self.font_info[font_family])
+ fontconfig.append(getattr(self, font_family_attr)[0])
 self._fontconfig = ''.join(fontconfig)
 
 # The following packages and commands need to be included in the latex
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /