From: <md...@us...> - 2010-04-30 16:54:17
|
Revision: 8291 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8291&view=rev Author: mdboom Date: 2010-04-30 16:54:10 +0000 (Fri, 30 Apr 2010) Log Message: ----------- Leave in some extra debugging information related to fonts. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/font_manager.py trunk/matplotlib/lib/matplotlib/mathtext.py Modified: trunk/matplotlib/lib/matplotlib/font_manager.py =================================================================== --- trunk/matplotlib/lib/matplotlib/font_manager.py 2010-04-30 14:41:40 UTC (rev 8290) +++ trunk/matplotlib/lib/matplotlib/font_manager.py 2010-04-30 16:54:10 UTC (rev 8291) @@ -397,6 +397,11 @@ except ValueError: self.size = size + def __repr__(self): + return "<Font '%s' (%s) %s %s %s %s>" % ( + self.name, os.path.basename(self.fname), self.style, self.variant, + self.weight, self.stretch) + def ttfFontProperty(font): """ Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2010-04-30 14:41:40 UTC (rev 8290) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2010-04-30 16:54:10 UTC (rev 8291) @@ -849,11 +849,11 @@ fontname, uniindex = self._map_virtual_font( fontname, font_class, uniindex) + new_fontname = fontname + # Only characters in the "Letter" class should be italicized in 'it' # mode. Greek capital letters should be Roman. if found_symbol: - new_fontname = fontname - if fontname == 'it': if uniindex < 0x10000: unistring = unichr(uniindex) @@ -883,8 +883,8 @@ else: 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')), + warn("Font '%s' does not have a glyph for '%s' [U%x]" % + (new_fontname, sym.encode('ascii', 'backslashreplace'), uniindex), MathTextWarning) warn("Substituting with a dummy symbol.", MathTextWarning) fontname = 'rm' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |