Latin and Greek letters in different fonts

141 views
Skip to first unread message

oribendor

unread,
Mar 15, 2012, 9:57:56 AM3/15/12
to MathJax Users
Hi all,

Suppose I want my website to display mathematical formulas with Latin
letters displayed in one standard font (say Arial) and Greek letters
in another (say Times New Roman).

Can MathJax be useful to me? Will it be easy to implement this with
MathJax?

Thanks,
Ori

Davide P. Cervone

unread,
Mar 16, 2012, 8:21:40 AM3/16/12
to mathja...@googlegroups.com
In order for MathJax to work properly, it needs to know a lot of
information about the fonts that it uses (like what characters are
available and what the bounding boxes are for them). It can't get
this directly from the fonts (Javascript has no access to that data),
so MathJax has built-in data files about the fonts that it knows
about. You can't substitute another font because MathJax doesn't have
data for that. So, for example, you can't switch to Arial or Times
New Roman because MathJax doesn't have data for these fonts. In order
to be a viable font to use for MathJax, the font must include many
mathematical symbols, as well as several math alphabets (black-board
bold, Fraktur, script, etc.), and in reality, it usually takes several
separate font files to accomplish this (the MathJax web fonts consist
of 26 different fonts, and the STIX fonts 29). So most fonts can't be
used by MathJax.

If you want to force individual characters to be in a particular font,
that can be done (though there are caveats to take into account). See
the discussion at

https://groups.google.com/d/topic/mathjax-users/PjcC7lqbNGs/discussion

for some ideas about this. The suggestion for how to force HTML-CSS
output to use the MathJax sans-serif font might work for your
situation, as it will put the letters and numbers into the sans-serif
font, but since those don't include lower-case Greek letters, those
will still be taken from MathJax's roman font. This will give a
similar effect to what you suggest (though the upper-case greek
letters will be sans-serif, since those are available in the sans-
serif font -- fixing that would be harder).

Davide

oribendor

unread,
Mar 20, 2012, 3:46:47 AM3/20/12
to MathJax Users
Thanks, Davide, I'll read the discussion you're referring to.
Reply all
Reply to author
Forward
0 new messages