Skip to content

Commit

Permalink
Merge pull request matplotlib#5439 from mdboom/default-font-fix
Browse files Browse the repository at this point in the history
Use DejaVu Sans as default fallback font
  • Loading branch information
jenshnielsen committed Nov 8, 2015
1 parent 696ff9f commit b720325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/font_manager.py
Expand Up @@ -1054,7 +1054,7 @@ def __init__(self, size=None, weight='normal'):

for fname in self.ttffiles:
verbose.report('trying fontname %s' % fname, 'debug')
if fname.lower().find('vera.ttf')>=0:
if fname.lower().find('DejaVuSans.ttf')>=0:
self.defaultFont['ttf'] = fname
break
else:
Expand Down Expand Up @@ -1296,7 +1296,7 @@ def findfont(self, prop, fontext='ttf', directory=None,
return self.findfont(default_prop, fontext, directory, False)
else:
# This is a hard fail -- we can't find anything reasonable,
# so just return the vera.ttf
# so just return the DejuVuSans.ttf
warnings.warn(
'findfont: Could not match %s. Returning %s' %
(prop, self.defaultFont[fontext]),
Expand Down

0 comments on commit b720325

Please sign in to comment.