8000 Backport PR #15626 on branch v3.2.x (Note minimum supported version for fontconfig.) by meeseeksmachine · Pull Request #15634 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Backport PR #15626 on branch v3.2.x (Note minimum supported version for fontconfig.) #15634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ etc., you can install the following:
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 3.4): for a larger
selection of image file formats: JPEG, BMP, and TIFF image files;
* `LaTeX <https://miktex.org/>`_ and `GhostScript (>=9.0)
<https://ghostscript.com/download/>`_ : for rendering text with LaTeX.
<https://ghostscript.com/download/>`_ : for rendering text with LaTeX;
* `fontconfig <https://www.fontconfig.org>`_ (>= 2.7): for detection of system
fonts on Linux.

.. note::

Expand Down
4 changes: 4 additions & 0 deletions lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ def _call_fc_list():
'This may take a moment.'))
timer.start()
try:
if b'--format' not in subprocess.check_output(['fc-list', '--help']):
_log.warning( # fontconfig 2.7 implemented --format.
'Matplotlib needs fontconfig>=2.7 to query system fonts.')
return []
out = subprocess.check_output(['fc-list', '--format=%{file}\\n'])
except (OSError, subprocess.CalledProcessError):
return []
Expand Down
0