Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix USE_FONTCONFIG=True mode #1666

Merged
merged 2 commits into from Jan 25, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/matplotlib/font_manager.py
Expand Up @@ -777,7 +777,7 @@ def get_size_in_points(self):
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):
Expand Down Expand Up @@ -997,7 +997,10 @@ def __init__(self, size=None, weight='normal'):
self.afmfiles = findSystemFonts(paths, fontext='afm') + \
findSystemFonts(fontext='afm')
self.afmlist = createFontList(self.afmfiles, fontext='afm')
self.defaultFont['afm'] = self.afmfiles[0]
if len(self.afmfiles):
self.defaultFont['afm'] = self.afmfiles[0]
else:
self.defaultFont['afm'] = None

self.ttf_lookup_cache = {}
self.afm_lookup_cache = {}
Expand All @@ -1008,7 +1011,8 @@ def get_default_weight(self):
"""
return self.__default_weight

def get_default_size(self):
@staticmethod
def get_default_size():
"""
Return the default font size.
"""
Expand Down