Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ddb1d5b

Browse filesBrowse files
committed
Make 'extended' and 'expanded' synonymous in font_manager
1 parent c989e32 commit ddb1d5b
Copy full SHA for ddb1d5b

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@
6262
'semi-condensed' : 400,
6363
'normal' : 500,
6464
'semi-expanded' : 600,
65+
'semi-extended' : 600,
6566
'expanded' : 700,
67+
'extended' : 700,
6668
'extra-expanded' : 800,
67-
'ultra-expanded' : 900}
69+
'extra-extended' : 800,
70+
'ultra-expanded' : 900,
71+
'ultra-extended' : 900}
6872

6973
weight_dict = {
7074
'ultralight' : 100,
@@ -412,7 +416,7 @@ def ttfFontProperty(font):
412416
stretch = 'condensed'
413417
elif sfnt4.find('demi cond') >= 0:
414418
stretch = 'semi-condensed'
415-
elif sfnt4.find('wide') >= 0 or sfnt4.find('expanded') >= 0:
419+
elif sfnt4.find('wide') >= 0 or sfnt4.find('expanded') >= 0 or sfnt4.find('extended') >= 0:
416420
stretch = 'expanded'
417421
else:
418422
stretch = 'normal'
@@ -480,7 +484,7 @@ def afmFontProperty(fontpath, font):
480484
stretch = 'semi-condensed'
481485
elif 'narrow' in fontname or 'cond' in fontname:
482486
stretch = 'condensed'
483-
elif 'wide' in fontname or 'expanded' in fontname:
487+
elif 'wide' in fontname or 'expanded' in fontname or 'extended' in fontname:
484488
stretch = 'expanded'
485489
else:
486490
stretch = 'normal'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.