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

Skip to content

Commit 4b36ac0

Browse files
committed
Merged revisions 5061-5068 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r5068 | mdboom | 2008-04-24 08:31:53 -0400 (Thu, 24 Apr 2008) | 2 lines Fix sub/superscript placement when the size of font has been changed. ........ svn path=/trunk/matplotlib/; revision=5069
1 parent b051446 commit 4b36ac0

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2008-04-24 Fix sub/superscripts when the size of the font has been
2+
changed - MGD
3+
14
2008-04-22 Use "svg.embed_char_paths" consistently everywhere - MGD
25

36
2008-04-20 Add support to MaxNLocator for symmetric axis autoscaling. - EF

lib/matplotlib/mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def get_xheight(self, font, fontsize, dpi):
651651
# Some fonts don't store the xHeight, so we do a poor man's xHeight
652652
metrics = self.get_metrics(font, 'it', 'x', fontsize, dpi)
653653
return metrics.iceberg
654-
xHeight = pclt['xHeight'] / 64.0
654+
xHeight = (pclt['xHeight'] / 64.0) * (fontsize / 12.0)
655655
return xHeight
656656

657657
def get_underline_thickness(self, font, fontsize, dpi):

0 commit comments

Comments
 (0)