Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c93ab96

Browse files
committed
Note minimum supported version for fontconfig.
1 parent 330a054 commit c93ab96

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

INSTALL.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ etc., you can install the following:
150150
* `ImageMagick <https://www.imagemagick.org/script/index.php>`_: for saving
151151
animated gifs;
152152
* `LaTeX <https://miktex.org/>`_ and `GhostScript (>=9.0)
153-
<https://ghostscript.com/download/>`_ : for rendering text with LaTeX.
153+
<https://ghostscript.com/download/>`_ : for rendering text with LaTeX;
154+
* `fontconfig <https://www.fontconfig.org>`_ (>= 2.7): for detection of system
155+
fonts on Linux.
154156

155157
FreeType and Qhull
156158
------------------

lib/matplotlib/font_manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ def _call_fc_list():
273273
'This may take a moment.'))
274274
timer.start()
275275
try:
276+
if b'--format' not in subprocess.check_output(['fc-list', '--help']):
277+
_log.warning( # fontconfig 2.7 implemented --format.
278+
'Matplotlib needs fontconfig>=2.7 to query system fonts.')
279+
return []
276280
out = subprocess.check_output(['fc-list', '--format=%{file}\\n'])
277281
except (OSError, subprocess.CalledProcessError):
278282
return []

0 commit comments

Comments
 (0)