Closed
Description
Bug report
In matplotlib v3.1.1, the font_manager.FontManager.score_weight
function was made more robust, and now issues an exception if a integer value is passed as a string (e.g. '500').
This, however, causes havoc with my custom style sheet, in which I define font.weight: 500
, which then appears to be converted to '500'
by the time it reaches the score_weight
function.
Expected outcome
Specifying font.weight: 500
used to work in earlier versions. The doc still suggests (indirectly) that this should work.
Question
What is the proper way to specify integer font weights in style sheets ? Should they be banned (and the doc clarified) in favor of name-based strings (e.g. normal
) ? Or the score_weight
function modified to handle them?
Matplotlib version
- Operating system: OS X 10.13.6
- Matplotlib version: 3.1.1
- Python version: 3.7.3