Revision: 8290 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8290&view=rev Author: mdboom Date: 2010-04-30 14:41:40 +0000 (Fri, 30 Apr 2010)
Log Message: ----------- Use case-insensitive matching for font names in family set lists (rcParams font.serif, font.sans-serif etc.) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/font_manager.py Modified: trunk/matplotlib/lib/matplotlib/font_manager.py =================================================================== --- trunk/matplotlib/lib/matplotlib/font_manager.py 2010-04-29 21:43:53 UTC (rev 8289) +++ trunk/matplotlib/lib/matplotlib/font_manager.py 2010-04-30 14:41:40 UTC (rev 8290) @@ -1056,15 +1056,18 @@ No match will return 1.0. """ + family2 = family2.lower() for i, family1 in enumerate(families): - if family1.lower() in font_family_aliases: + family1 = family1.lower() + if family1 in font_family_aliases: if family1 == 'sans': family1 == 'sans-serif' options = rcParams['font.' + family1] + options = [x.lower() for x in options] if family2 in options: idx = options.index(family2) return 0.1 * (float(idx) / len(options)) - elif family1.lower() == family2.lower(): + elif family1 == family2: return 0.0 return 1.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins