Skip to content

Commit ea98aec

Browse files
authored
Merge pull request #24239 from oscargus/mathtextbar
Fix mathtext rendering of `\|` and sizing of `|` and `\|`
2 parents 799f735 + d1bc341 commit ea98aec

18 files changed

+926
-646
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ def __init__(self, c, height, depth, state, always=False, factor=None):
14551455
break
14561456

14571457
shift = 0
1458-
if state.font != 0:
1458+
if state.font != 0 or len(alternatives) == 1:
14591459
if factor is None:
14601460
factor = target_total / (char.height + char.depth)
14611461
state.fontsize *= factor

lib/matplotlib/_mathtext_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
'succnsim' : 8937,
527527
'gimel' : 8503,
528528
'vert' : 124,
529-
'|' : 124,
529+
'|' : 8214,
530530
'varrho' : 1009,
531531
'P' : 182,
532532
'approxident' : 8779,
Binary file not shown.
Lines changed: 216 additions & 160 deletions
Loading
Binary file not shown.

0 commit comments

Comments
 (0)