Re: [mathjax-users] Applying specific fonts to specific div objects.

10 views
Skip to first unread message
Message has been deleted

Davide Cervone

unread,
May 9, 2018, 9:51:33 AM5/9/18
to mathja...@googlegroups.com
Because MathJax needs to know a lot of details about the fonts that it uses (bounding box of each character, what characters are available, which ones fit together to form stretchy delimiters, etc.), it only supports a specific set of fonts for which it has that information.  So you can't change fonts for MathJax using CSS.  Also, MathJax only allows loading font data for one font per page, so all the math will be rendered using the same font.

If your input is TeX, you can use the `\style{}` macro to force individual characters to come from a different font, but that doesn't work over multiple characters and since it requires MathJax to try to measure the characters bounding box by hand, it causes page reflows that would considerably slow down the rendering of the math if it were used for every character.

So the answer to your question is "no, there is no way to do that currently".

Davide


On May 6, 2018, at 9:57 AM, Thiago Brevidelli <thiago.brevi...@gmail.com> wrote:

Is there a way to apply a specific font-family to every bit of math contained inside a specific div object? Something like:

MathJax.Hub.Config({
      "HTML-CSS": {
              document.getElementById("specificDOM"): {webFont: "specificFont.woff",},
      }
});

Thanks for the attention.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages