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