From: <md...@us...> - 2008-05-30 14:32:30
|
Revision: 5319 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5319&view=rev Author: mdboom Date: 2008-05-30 07:32:29 -0700 (Fri, 30 May 2008) Log Message: ----------- Fix mathtext bug (fractions too close together) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mathtext.py Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-05-30 14:29:27 UTC (rev 5318) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-05-30 14:32:29 UTC (rev 5319) @@ -656,7 +656,7 @@ def get_underline_thickness(self, font, fontsize, dpi): cached_font = self._get_font(font) - return cached_font.font.underline_thickness / 64.0 / fontsize * (10.0 * dpi / 100.0) + return (cached_font.font.underline_thickness / 64.0 / fontsize) * (dpi) 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. |
From: <md...@us...> - 2008-06-04 18:31:20
|
Revision: 5388 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5388&view=rev Author: mdboom Date: 2008-06-04 11:31:19 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Removing some debugging output. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mathtext.py Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-06-04 18:25:41 UTC (rev 5387) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-06-04 18:31:19 UTC (rev 5388) @@ -2108,16 +2108,6 @@ + (group | Error("Expected \sqrt{value}")) ).setParseAction(self.sqrt).setName("sqrt") - print (accent - ^ function - ^ (c_over_c | symbol) - ^ group - ^ frac - ^ sqrt - ) | Error("Expected symbol or group") - - print Error("Expected symbol or group") - placeable <<(accent ^ function ^ (c_over_c | symbol) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-06-16 13:41:26
|
Revision: 5557 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5557&view=rev Author: mdboom Date: 2008-06-16 06:41:14 -0700 (Mon, 16 Jun 2008) Log Message: ----------- Minor mathtext improvements Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mathtext.py Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-06-16 13:04:07 UTC (rev 5556) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-06-16 13:41:14 UTC (rev 5557) @@ -725,15 +725,8 @@ cached_font.charmap[num]) if symbol_name is None: - return self._stix_fallback._get_glyph(fontname, font_class, sym, fontsize) - warn("Unrecognized symbol '%s'. Substituting with a dummy symbol." - % sym.encode('ascii', 'backslashreplace'), MathTextWarning) - fontname = 'it' - cached_font = self._get_font(fontname) - num = 0x3F # currency character, for lack of anything better - gid = cached_font.charmap[num] - symbol_name = cached_font.font.get_glyph_name(gid) - slanted = False + return self._stix_fallback._get_glyph( + fontname, font_class, sym, fontsize) return cached_font, num, symbol_name, fontsize, slanted @@ -865,10 +858,7 @@ glyphindex = cached_font.charmap[uniindex] found_symbol = True except KeyError: - warn("Font '%s' does not have a glyph for '%s'" % - (cached_font.font.postscript_name, - sym.encode('ascii', 'backslashreplace')), - MathTextWarning) + pass if not found_symbol: if self.cm_fallback: @@ -879,6 +869,10 @@ else: if fontname == 'it' and isinstance(self, StixFonts): return self._get_glyph('rm', font_class, sym, fontsize) + warn("Font '%s' does not have a glyph for '%s'" % + (cached_font.font.postscript_name, + sym.encode('ascii', 'backslashreplace')), + MathTextWarning) warn("Substituting with a dummy symbol.", MathTextWarning) fontname = 'rm' new_fontname = fontname This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-06-17 14:43:38
|
Revision: 5571 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5571&view=rev Author: mdboom Date: 2008-06-17 07:42:31 -0700 (Tue, 17 Jun 2008) Log Message: ----------- Final fix to get STIX fonts working on Unicode-narrow platforms. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mathtext.py Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-06-17 14:40:10 UTC (rev 5570) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-06-17 14:42:31 UTC (rev 5571) @@ -842,10 +842,11 @@ new_fontname = fontname if fontname == 'it': - unistring = unichr(uniindex) - if (not unicodedata.category(unistring)[0] == "L" - or unicodedata.name(unistring).startswith("GREEK CAPITAL")): - new_fontname = 'rm' + if uniindex < 0x10000: + unistring = unichr(uniindex) + if (not unicodedata.category(unistring)[0] == "L" + or unicodedata.name(unistring).startswith("GREEK CAPITAL")): + new_fontname = 'rm' slanted = (new_fontname == 'it') or sym in self._slanted_symbols found_symbol = False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |