From: <md...@us...> - 2008-04-28 13:41:36
|
Revision: 5089 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5089&view=rev Author: mdboom Date: 2008-04-28 06:41:28 -0700 (Mon, 28 Apr 2008) Log Message: ----------- Fix bug where fraction beams were too wide at lower dpi's. Fix sub/superscript placement at different dpi's. Modified Paths: -------------- branches/v0_91_maint/lib/matplotlib/mathtext.py Modified: branches/v0_91_maint/lib/matplotlib/mathtext.py =================================================================== --- branches/v0_91_maint/lib/matplotlib/mathtext.py 2008-04-28 13:07:41 UTC (rev 5088) +++ branches/v0_91_maint/lib/matplotlib/mathtext.py 2008-04-28 13:41:28 UTC (rev 5089) @@ -651,12 +651,12 @@ # Some fonts don't store the xHeight, so we do a poor man's xHeight metrics = self.get_metrics(font, 'it', 'x', fontsize, dpi) return metrics.iceberg - xHeight = (pclt['xHeight'] / 64.0) * (fontsize / 12.0) + xHeight = (pclt['xHeight'] / 64.0) * (fontsize / 12.0) * (dpi / 100.0) return xHeight def get_underline_thickness(self, font, fontsize, dpi): cached_font = self._get_font(font) - return max(1.0, cached_font.font.underline_thickness / 64.0 / fontsize * 10.0) + return cached_font.font.underline_thickness / 64.0 / fontsize * (10.0 * dpi / 100.0) def get_kern(self, font1, fontclass1, sym1, fontsize1, font2, fontclass2, sym2, fontsize2, dpi): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |