From: John H. <jdh...@ac...> - 2004-10-01 22:22:29
|
>>>>> "Jared" == Jared Wahlstrand <wah...@um...> writes: Jared> Hello, The attached patches implement mathtext for SVG. The Jared> output looks pretty good when viewed by Inkscape, but not Jared> the Adobe SVG viewer (it shows the wrong symbols and then Jared> moments later crashes Mozilla, at least on my system). It Jared> hasn't been thoroughly tested for all of the possible Jared> symbols. Hmm, this is strange and intriguing. I notice that you do not embed the fonts in your svg document, which is presumably why most viewers can't handle it. I confirmed that librsvg, which gqview uses, can't render the fonts either. The question is, why can Inkscape do it? I downloaded Inkscape and did a recursive grep through their src as well as a find in the root of their src tree and found no references to 'computer modern' or cmex, etc.... Did you have to set some path in inkscape to see your cm fonts, or did you put them in some standard place? Anyone have any ideas how inkscape manages to pull off this trick? Jared> I had to add a math_parse_s_ft2font_svg() to mathtext.py, Jared> which basically does the same thing as Jared> math_parse_s_ft2font() but returns something different. I Jared> tried to just modify the latter function to take a Jared> "usingSVG=True" argument and ran into all sorts of bizarre Jared> problems, probably associated with the caching, and gave Jared> up. Perhaps someone can figure out how to do this more Jared> elegantly. Probably the best way to do this is to subclass BakomaTrueTypeFonts and override the just methods you need. Jared> John, are there any more features still missing from the Jared> SVG backend? That almost does it. I think we need an option to embed the fonts directly into the svg document like we do for PS, because I think viewers that have the cm* fonts built in will be the exception rather than the rule. Fernando Perez has some colleagues who are interested in embedding clickable tags in svg, but I haven't heard much from them. But overall SVG is in fine shape. Many thanks! JDH |