8000 Light font variants cannot be accessed by common name · Issue #4822 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Light font variants cannot be accessed by common name #4822
Open
@EdwinChan

Description

@EdwinChan

The following Ubuntu fonts are installed on my system:

/home/edwin/.fonts/Ubuntu-LI.ttf: Ubuntu,Ubuntu Light:style=Light Italic,Italic
/home/edwin/.fonts/Ubuntu-L.ttf: Ubuntu,Ubuntu Light:style=Light,Regular
/home/edwin/.fonts/Ubuntu-M.ttf: Ubuntu,Ubuntu Light:style=Medium,Bold
/home/edwin/.fonts/Ubuntu-BI.ttf: Ubuntu:style=Bold Italic
/home/edwin/.fonts/Ubuntu-RI.ttf: Ubuntu:style=Italic
/home/edwin/.fonts/Ubuntu-R.ttf: Ubuntu:style=Regular
/home/edwin/.fonts/Ubuntu-MI.ttf: Ubuntu,Ubuntu Light:style=Medium Italic,Bold Italic
/home/edwin/.fonts/Ubuntu-B.ttf: Ubuntu:style=Bold

Ubuntu Light is shown with two family names: Ubuntu and Ubuntu Light. In XeTeX I can select the font directly by naming Ubuntu Light, but I cannot do the same in matplotlib:

matplotlib.rcParams['font.family'] = 'Ubuntu Light'

Instead, I must use a more obscure (albeit more technically correct) method:

matplotlib.rcParams['font.family'] = 'Ubuntu'
matplotlib.rcParams['font.weight'] = 200

It would be convenient if Ubuntu Light could be addressed directly by its 'common' name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!keepItems to be ignored by the “Stale” Github Actiontopic: text/fonts

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0