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 fe1641b

Browse filesBrowse files
tacaswellQuLogic
authored andcommitted
Merge pull request #7907 from jkseppan/fc-list-format
BUG: Add a newline separator in fc-list call
1 parent c4dee7a commit fe1641b
Copy full SHA for fe1641b

File tree

Expand file treeCollapse file tree

2 files changed

+10
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-4
lines changed

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def _call_fc_list():
281281
'This may take a moment.'))
282282
timer.start()
283283
try:
284-
out = subprocess.check_output([str('fc-list'), '--format=%{file}'])
284+
out = subprocess.check_output([str('fc-list'), '--format=%{file}\\n'])
285285
except (OSError, subprocess.CalledProcessError):
286286
return []
287287
finally:

‎lib/matplotlib/tests/test_font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_font_manager.py
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
import six
66

77
import os
8-
import os.path
9-
from matplotlib.font_manager import (findfont, FontProperties, get_font,
10-
is_opentype_cff_font, fontManager as fm)
8+
import sys
9+
10+
from matplotlib.font_manager import (
11+
findfont, FontProperties, get_font,
12+
get_fontconfig_fonts, is_opentype_cff_font, fontManager as fm)
1113
from matplotlib import rc_context
1214

1315

@@ -36,3 +38,7 @@ def test_otf():
3638
with open(f, 'rb') as fd:
3739
res = fd.read(4) == b'OTTO'
3840
assert res == is_opentype_cff_font(f)
41+
42+
43+
def test_get_fontconfig_fonts():
44+
assert sys.platform == 'win32' or len(get_fontconfig_fonts()) > 1

0 commit comments

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