diff -ur matplotlib-1.2.0.orig/lib/matplotlib/font_manager.py matplotlib-1.2.0/lib/matplotlib/font_manager.py
--- matplotlib-1.2.0.orig/lib/matplotlib/font_manager.py 2012-10-31 01:11:14.000000000 +0100
+++ matplotlib-1.2.0/lib/matplotlib/font_manager.py 2013-04-03 01:50:34.433802284 +0200
@@ -62,7 +62,7 @@
except ImportError:
import pickle
-USE_FONTCONFIG = False
+USE_FONTCONFIG = True
verbose = matplotlib.verbose
@@ -771,7 +771,7 @@
return float(self._size)
except ValueError:
pass
- default_size = fontManager.get_default_size()
+ default_size = FontManager.get_default_size()
return default_size * font_scalings.get(self._size)
def get_file(self):
@@ -991,7 +991,10 @@
self.afmfiles = findSystemFonts(paths, fontext='afm') + \
findSystemFonts(fontext='afm')
self.afmlist = createFontList(self.afmfiles, fontext='afm')
- self.defaultFont['afm'] = self.afmfiles[0]
+ try:
+ self.defaultFont['afm'] = self.afmfiles[0]
+ except IndexError:
+ self.defaultFont['afm'] = None
self.ttf_lookup_cache = {}
self.afm_lookup_cache = {}
@@ -1002,7 +1005,8 @@
"""
return self.__default_weight
- def get_default_size(self):
+ @staticmethod
+ def get_default_size():
"""
Return the default font size.
"""
@@ -1276,7 +1280,7 @@
except OSError:
return None
if pipe.returncode == 0:
- for match in _fc_match_regex.finditer(output):
+ for match in _fc_match_regex.finditer(output.decode("utf-8")):
file = match.group(1)
if os.path.splitext(file)[1][1:] in fontexts:
return file
diff -ur matplotlib-1.2.0.orig/lib/matplotlib/mpl-data/matplotlibrc matplotlib-1.2.0/lib/matplotlib/mpl-data/matplotlibrc
--- matplotlib-1.2.0.orig/lib/matplotlib/mpl-data/matplotlibrc 2012-11-08 17:39:20.000000000 +0100
+++ matplotlib-1.2.0/lib/matplotlib/mpl-data/matplotlibrc 2013-04-03 01:50:03.693755542 +0200
@@ -198,7 +198,7 @@
#mathtext.it : serif:italic
#mathtext.bf : serif:bold
#mathtext.sf : sans
-#mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix',
+mathtext.fontset : stix # Should be 'cm' (Computer Modern), 'stix',
# 'stixsans' or 'custom'
#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern
# fonts when a symbol can not be found in one of