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

Skip to content

Commit 2278607

Browse files
authored
Merge pull request #7945 from settheory/master
fix StixSans mapping bug
2 parents d4c24f2 + d858133 commit 2278607

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/mathtext.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,10 @@ def _map_virtual_font(self, fontname, font_class, uniindex):
999999

10001000
if mapping is not None:
10011001
if isinstance(mapping, dict):
1002-
mapping = mapping.get(font_class, 'rm')
1002+
try:
1003+
mapping = mapping[font_class]
1004+
except KeyError:
1005+
mapping = mapping['rm']
10031006

10041007
# Binary search for the source glyph
10051008
lo = 0

0 commit comments

Comments
 (0)