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

[Bug]: svg backend does not use configured generic family lists #23492

Closed
Milestone
@l-johnston

Description

@l-johnston

Bug summary

The FontProperties family parameter can be a generic family such as sans-serif and the actual font should be looked up in rcParams according to the documentation.

Code for reproduction

>>>importmatplotlibasmpl>>>importmatplotlib.font_managerasfm>>>mpl.rcParams["font.family"]['sans-serif']>>>mpl.rcParams["font.sans-serif"]['DejaVu Sans','Bitstream Vera Sans','Computer Modern Sans Serif','Lucida Grande','Verdana','Geneva','Lucid','Arial','Helvetica','Avant Garde','sans-serif']>>>fp=fm.FontProperties()<matplotlib.font_manager.FontPropertiesat ...>>>>fp.get_family()['sans-serif']

Actual outcome

>>>fp.get_family()['sans-serif']

Expected outcome

>>>fp.get_family()['DejaVu Sans','Bitstream Vera Sans','Computer Modern Sans Serif','Lucida Grande','Verdana','Geneva','Lucid','Arial','Helvetica','Avant Garde','sans-serif']

Additional information

No response

Operating system

Windows

Matplotlib Version

3.5.2

Matplotlib Backend

TkAgg

Python version

3.9.13

Jupyter version

N/A

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp