8000 Note minimum supported version for fontconfig. · matplotlib/matplotlib@1e31eb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e31eb0

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

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

INSTALL.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ 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_ (>= 2.7): for detection of system fonts on Linux.
155+
156+
.. _fontconfig: https://www.fontconfig.org
154157

155158
FreeType and Qhull
156159
------------------

lib/matplotlib/font_manager.py

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

0 commit comments

Comments
 (0)
0