<
8000
div class="clearfix new-discussion-timeline js-check-all-container container-xl px-3 px-md-4 px-lg-5 mt-4" data-pjax="" data-turbo-frame="">
Can't specify integer
Can't specify integer font.weight
in custom style sheet any more
#15240
Labels
Release critical
For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
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 thescore_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 thescore_weight
function modified to handle them?Matplotlib version
The text was updated successfully, but these errors were encountered: