mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.25k stars 1.16k forks source link

Regression with mglyph #2298

Open NSoiffer opened 6 years ago

NSoiffer commented 6 years ago

Here's the code:

<math  xmlns="http://www.w3.org/1998/Math/MathML">
    <mi>
         <mglyph fontfamily="my-braid-font" index="2" alt="23braid"/>
    </mi>
    <mspace width="10px"/>
    <mn>
         <mglyph fontfamily="Curlz MT" index="65" alt="script 'A'"/>
    </mn>
    <mspace width="10px"/>
    <mn>
         <mglyph fontfamily="Arial" index="97" alt="lowercase 'a'"/>
    </mn>
</math>

Here's V2's rendering: image

Here's V3's rendering: image

dpvc commented 5 years ago

The current mglyph implementation is somewhat more restricted than the v2 version. It doesn't currently implement the deprecated fontfamily and index attributes (and may not in the future). Actually, it does fontfamily as that was available on all elements, but it doesn't do the index attribute. So you are getting broken image icons for the missing src attribute, and the content of the alt attributes since the images aren't showing.

I'll look into implementing the index attribute for the future.

dpvc commented 4 years ago

I'm transferring this issue to the main MathJax issue tracker, so it is easier to locate.