Re: [LaTeXML] Fwd: Special TeX/LaTeX fonts in MathML (calligraphy vs. script)

[email protected] Wed, 16 Jul 2014 13:32:41 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.mathml
Message-ID <[email protected]>
Hi Fred,


> MathJax uses some class="MJX-tex-caligraphic" to indicate that a 
> 
> specific style (i.e. font-family, at least for the HTML-CSS output) 
> 
> should be used. This is obviously a non-standard method: 

I find it odd to call this approach "non-standard". As you already pointed out, there is no "standard" way in MathML to specify calligraphic variants.

To me, it would be "non-standard" if somebody simply used mathvariant="calligraphic" or some such thing. But, again as you wrote, using a sensible class name is, well, the sensible thing to do. 


> it's nowhere 
> 
> written in the MathML spec that such class name should have a specific 
> 
> interpretation and there is no reason why a MathML rendering engine 
> 
> should behave the same as MathJax. 

Sure.


> Conversely, if LaTeXML or other tools 
> 
> use their own class name ("ltx_font_mathcaligraphic" etc) that will be 
> 
> totally ignored by MathJax. 

Well, by default, sure. But if David Starbuck is taking the time to write some CSS to make it work on Firefox I expect there'll be time to pass that information to the MathJax configuration. So I don't quite see the difference here.


> IIRC David's reply, he didn't suggest any standardization. He just 
> 
> repeated that the mathvariant behavior is defined to be equivalent to 
> 
> Unicode characters that themselves have some kind of semantics 
> 
> interpretation (as we already discussed, MathJax does not follow the 
> 
> spec here but that's a separate issue anyway) and so this does not make 
> 
> possible to add old style number or caligraphic as mathvariants. Adding 
> 
> a non-normative suggestion for class names would not help much to make 
> 
> it cross-compatible because people could still be free to use something 
> 
> else and moreover they may conflict with one author's own class names.

I don't consider MathML (or Unicode) to be set in stone. It would probably not be easy but I think there's a strong case for it, especially if both authoring and rendering people worked together.


> On the other hand if the authors use its own CSS selectors and apply 
> 
> OpenType tags & font-feature-settings then these are well-defined in the 
> 
> respective specifications and could work in any Web browsers. This is at 
> 
> least already implemented in Gecko & Blink under some prefixes.

That's a great new feature. I'm hoping we'll see other browsers pick it up.  Though it doesn't provide the same semantic flavor that mathvariant (or some alternative attribute) would. 
 
> The problem here is that math font designers do not use these features 
> 
> very consistently, so the authors might need to handle that in a 
> 
> per-font basis. 

> Given that standardizing new mathvariants at the MathWG 
> 
> is not possible, I believe people working on the OpenType font format 
> 
> and on math fonts should try to agree on the OpenType tags to use 
> 
> (apparently "onum" is already standard).

Yes, it would help rendering engines to have fonts that are consistent. I suppose I have a different opinion about mathvariants being set in stone though. 


Anyway, it seems to me the answer David Starbuck's original question is that there's an easy way to handle the problem on both latest versions of Gecko/Firefox as well as MathJax via rather simple CSS (+ a well-designed font).

Regards,
Peter.