Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix filename decoding when calling fc-match #1921

Merged
merged 1 commit into from

4 participants

@mdboom
Owner

Fixes #1879

@pelson
Collaborator

Travis failure looks like a red-herring. @mdboom - I don't have enough understanding of the problem to have any confidence of merging this, so its down to others/you I'm afraid...

@mdboom mdboom merged commit 3d65613 into from
@pferreir

Was that b intentional?

Owner

Yes -- but Python requires it to be br, not rb. Sorry about that.

Collaborator

Ah - My bad for merging. Thanks for fixing @mdboom

@mdboom mdboom deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/matplotlib/font_manager.py
View
3  lib/matplotlib/font_manager.py
@@ -1289,11 +1289,12 @@ def fc_match(pattern, fontext):
if pipe.returncode == 0:
for match in _fc_match_regex.finditer(output):
file = match.group(1)
+ file = file.decode(sys.getfilesystemencoding())
if os.path.splitext(file)[1][1:] in fontexts:
return file
return None
- _fc_match_regex = re.compile(r'\sfile:\s+"([^"]*)"')
+ _fc_match_regex = re.compile(rb'\sfile:\s+"([^"]*)"')
_fc_match_cache = {}
def findfont(prop, fontext='ttf'):
Something went wrong with that request. Please try again.