Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a10efc

Browse files
committed
An inferred weight should be stored as a numeric value to gain lower priority (this commit is a partial revert of d94a6a5)
1 parent 97e7dac commit 8a10efc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/font_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,9 @@ def ttfFontProperty(font):
439439
weight = next((w for w in weight_dict if sfnt4.find(w) >= 0), None)
440440
if not weight:
441441
if font.style_flags & ft2font.BOLD:
442-
weight = "bold"
442+
weight = 700
443443
else:
444-
weight = "normal"
444+
weight = 400
445445

446446
# Stretch can be absolute and relative
447447
# Absolute stretches are: ultra-condensed, extra-condensed, condensed,

0 commit comments

Comments
 (0)