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

Skip to content

Commit 0e5b8d6

Browse files
QuLogicMeeseeksDev[bot]
authored andcommitted
Backport PR #15626: Note minimum supported version for fontconfig.
1 parent 43665e0 commit 0e5b8d6

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

INSTALL.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ etc., you can install the following:
164164
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 3.4): for a larger
165165
selection of image file formats: JPEG, BMP, and TIFF image files;
166166
* `LaTeX <https://miktex.org/>`_ and `GhostScript (>=9.0)
167-
<https://ghostscript.com/download/>`_ : for rendering text with LaTeX.
167+
<https://ghostscript.com/download/>`_ : for rendering text with LaTeX;
168+
* `fontconfig <https://www.fontconfig.org>`_ (>= 2.7): for detection of system
169+
fonts on Linux.
168170

169171
.. note::
170172

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)