Blame SOURCES/python-matplotlib-fontconfig.patch

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