8000 [Doc]: Documentation should clearly describe how a user can make matplotlib load custom fonts per default · Issue #24872 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Doc]: Documentation should clearly describe how a user can make matplotlib load custom fonts per default #24872
Open
@benmaier

Description

@benmaier

Documentation Link

https://matplotlib.org/stable/users/explain/fonts.html#how-matplotlib-selects-fonts

Problem

The documentation is vague regarding how one should go about letting matplotlib find a directory filled with custom font files.

My current problem is that I want matplotlib, per default, to load a few font files that I cannot install systemwide, because I do not have the rights to do so (linux server). Typically, on Linux, custom fonts are stored either in ~/.fonts/ or ~/.local/share/fonts/. Yet, even after rebuilding the linux font cache, matplotlib does not find any of the custom fonts. Previously, I made that happen by copy-pasting the files to matplotlib's .../mpl-data/ttf/ directory, but that does not seem to work anymore (matplotlib version: 3.6.2). In earlier version there existed a fontList.cache but that does not exist anymore either.

Suggested improvement

There should be an extra section explaining how to set up a custom font-file or font-directory that matplotlib will remember to search when imported. Obviously I'm fine with whatever solution any current matplotlib version has for this problem, but the documentation is lacking clear communication on how to solve it.

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

      0