Skip to content

Navigation Menu

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

[Bug]: Warning: Font Family not found #20850

Copy link
Copy link
Open
@FranzForstmayr

Description

@FranzForstmayr
Issue body actions

Bug summary

Usign Latex fonts as recommended here throws a Warning:

findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
findfont: Generic family 'serif' not found because none of the following families were found: 

Code for reproduction

import matplotlib.pyplot as plt

plt.rcParams.update({
    "font.family": "serif",
    # Use LaTeX default serif font.
    "font.serif": [],
    # Use specific cursive fonts.
    "font.cursive": ["Comic Neue", "Comic Sans MS"],
})

plt.figure()
plt.plot([1,2,3,4])
plt.savefig('test.png')
plt.savefig('test.pgf')

Actual outcome

The Bug is also visible in your Docs.
https://matplotlib.org/stable/gallery/userdemo/pgf_fonts.html

Expected outcome

No Warning should get thrown everytime

Operating system

Ubuntu

Matplotlib Version

3.4.2

Matplotlib Backend

TkAgg

Python version

3.9.5

Jupyter version

No response

Other libraries

No response

Installation

pip

Conda channel

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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