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 d858133

Browse filesBrowse files
authored
fix StixSans mapping bug
use default map 'rm' if given font class is not found
1 parent 226729d commit d858133
Copy full SHA for d858133

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎lib/matplotlib/mathtext.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mathtext.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,10 @@ def _map_virtual_font(self, fontname, font_class, uniindex):
10021002

10031003
if mapping is not None:
10041004
if isinstance(mapping, dict):
1005-
mapping = mapping.get(font_class, 'rm')
1005+
try:
1006+
mapping = mapping[font_class]
1007+
except KeyError:
1008+
mapping = mapping['rm']
10061009

10071010
# Binary search for the source glyph
10081011
lo = 0

0 commit comments

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