Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3d65613

Browse filesBrowse files
committed
Merge pull request matplotlib#1921 from mdboom/fc-match-encoding
Fix filename decoding when calling fc-match
2 parents 2920408 + 2415c62 commit 3d65613
Copy full SHA for 3d65613

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,11 +1289,12 @@ def fc_match(pattern, fontext):
12891289
if pipe.returncode == 0:
12901290
for match in _fc_match_regex.finditer(output):
12911291
file = match.group(1)
1292+
file = file.decode(sys.getfilesystemencoding())
12921293
if os.path.splitext(file)[1][1:] in fontexts:
12931294
return file
12941295
return None
12951296

1296-
_fc_match_regex = re.compile(r'\sfile:\s+"([^"]*)"')
1297+
_fc_match_regex = re.compile(rb'\sfile:\s+"([^"]*)"')
12971298
_fc_match_cache = {}
12981299

12991300
def findfont(prop, fontext='ttf'):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.