|
From: <md...@us...> - 2010-05-12 14:55:34
|
Revision: 8311
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8311&view=rev
Author: mdboom
Date: 2010-05-12 14:55:27 +0000 (Wed, 12 May 2010)
Log Message:
-----------
Support "sans serif" as an alias for "sans-serif" in font family names.
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-05-12 14:50:24 UTC (rev 8310)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py 2010-05-12 14:55:27 UTC (rev 8311)
@@ -401,8 +401,8 @@
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):
"""
A function for populating the :class:`FontKey` by extracting
@@ -1065,7 +1065,7 @@
for i, family1 in enumerate(families):
family1 = family1.lower()
if family1 in font_family_aliases:
- if family1 == 'sans':
+ if family1 in ('sans', 'sans serif'):
family1 == 'sans-serif'
options = rcParams['font.' + family1]
options = [x.lower() for x in options]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|