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

Skip to content

Commit d561d2e

Browse files
committed
Merge branch 'v1.5.x' into v2.0.x
2 parents 2623b24 + 7132283 commit d561d2e

17 files changed

+894
-2
lines changed

lib/matplotlib/mathtext.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,10 +2859,12 @@ def subsuper(self, s, loc, toks):
28592859
new_children = nucleus.children
28602860
if len(new_children):
28612861
# remove last kern
2862-
if isinstance(new_children[-1],Kern):
2862+
if (isinstance(new_children[-1],Kern) and
2863+
hasattr(new_children[-2], '_metrics')):
28632864
new_children = new_children[:-1]
28642865
last_char = new_children[-1]
2865-
last_char.width = last_char._metrics.advance
2866+
if hasattr(last_char, '_metrics'):
2867+
last_char.width = last_char._metrics.advance
28662868
# create new Hlist without kerning
28672869
nucleus = Hlist(new_children, do_kern=False)
28682870
else:
Binary file not shown.
Lines changed: 236 additions & 0 deletions
Loading
Binary file not shown.
Lines changed: 134 additions & 0 deletions
Loading
Binary file not shown.

0 commit comments

Comments
 (0)