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 472ed1e

Browse filesBrowse files
committed
Fix sub/superscript placement when the size of font has been changed.
svn path=/branches/v0_91_maint/; revision=5068
1 parent 4b7298d commit 472ed1e
Copy full SHA for 472ed1e

File tree

2 files changed

+4
-1
lines changed
Filter options

2 files changed

+4
-1
lines changed

‎CHANGELOG

Copy file name to clipboardExpand all lines: CHANGELOG
+3Lines 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-11 Fix global font rcParam setting after initialization

‎lib/matplotlib/mathtext.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mathtext.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.