Skip to content

Font not found for matplotlib #1274

@tahorst

Description

@tahorst

After #1265, there is sometimes an issue finding a font on the system and you'll see the following message:

findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.

I found you can get around this by removing a matplotlib cache so that matplotlib rebuilds the font cache the next time it runs:

rm -r ~/.cache/matplotlib/

Apparently, Sherlock only has dejavu sans installed as a font so you might need to copy arial.ttf from $PI_HOME/.fonts/arial.ttf (this is from my local font directory /usr/share/fonts/truetype/msttcorefonts/arial.ttf) to ~/.fonts/ and then remove the matplotlib cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions