svg fonts and mathtext

I was going to check if this also fixed the dot on the 'i' in sin as
well as the equals sign, but I get the following:

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py", line 616, in _get_info
    raise ValueError('unrecognized symbol "%s"' % sym)
ValueError: unrecognized symbol "\sin"

  - Paul

···

On Fri, Sep 07, 2007 at 10:58:47AM -0400, Michael Droettboom wrote:

Paul Kienzle wrote:
> On Fri, Sep 07, 2007 at 06:40:55AM -0400, Michael Droettboom wrote:
>> I'd be curious to see a screenshot of what Safari looks like. It may be a simple fix on our end.
>
> See attached.

It turns out this "difference" (I'm not calling it a bug) is visible in
Inkscape as well.

There seems to be some disagreement about the 'Z' operator on SVG paths
(which is supposed to close the current path segment). In Firefox, 'Z'
doesn't move the reference point for subsequent relative operations,
whereas in Inkscape (and presumably Safari) it does. So the delta
problem is because the inner triangle was being drawn offset outside of
the outer triangle. The workaround in matplotlib is to never do a
relative operation after the 'Z' operator (r3808) and avoid exercising
this difference.

Unfortunately, the SVG 1.1 and 1.2 specs don't appear to directly
address this issue (at least it isn't very explicit):

  Paths — SVG 2

So it's hard to say who's "to blame" here, but perhaps the spec should
be clarified.

Paul Kienzle wrote:

I was going to check if this also fixed the dot on the 'i' in sin as
well as the equals sign,

FWIW, it did for me in Inkscape.

but I get the following:

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py", line 616, in _get_info
    raise ValueError('unrecognized symbol "%s"' % sym)
ValueError: unrecognized symbol "\sin"

Strange. My recent bugfixes shouldn't have affected that file.

That line number doesn't match up with what I have in svn trunk. Perhaps you somehow have reverted to an older version...?

Cheers,
Mike

···

--
Michael Droettboom
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA