Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[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 afontList.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


      [8]ページ先頭

      ©2009-2025 Movatter.jp