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

Skip to content

Commit cae0302

Browse files
committed
supporting fontweight options specially bold ones
1 parent 5fd2d99 commit cae0302

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

lib/matplotlib/font_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
'bold': 700,
9494
'heavy': 800,
9595
'extra bold': 800,
96+
'extrabold': 800,
97+
'superbold': 800,
98+
'ultrabold': 800,
9699
'black': 900,
97100
}
98101
_weight_regexes = [

lib/matplotlib/tests/test_font_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ def test_normalize_weights():
427427
assert _normalize_weight('bold') == 700
428428
assert _normalize_weight('heavy') == 800
429429
assert _normalize_weight('extra bold') == 800
430+
assert _normalize_weight('extrabold') == 800
431+
assert _normalize_weight('superbold') == 800
432+
assert _normalize_weight('ultrabold') == 800
430433
assert _normalize_weight('black') == 900
431434
with pytest.raises(KeyError):
432435
_normalize_weight('invalid')

0 commit comments

Comments
 (0)