mathjax / MathJax-node

MathJax for Node
Apache License 2.0
616 stars 97 forks source link

LaTeX equation renders different letters in SVG depending on font #445

Closed dac514 closed 5 years ago

dac514 commented 5 years ago

Given this LaTeX equation:

\boldsymbol{\frac{m_{\textbf{drop}}gd}{V}}

I get different results depending on the font I am using.

Is this the expected behaviour?

-=-=-

When I use TeX fonts and generate an SVG I get:

image

When I use Asana-Math I get:

image

dac514 commented 5 years ago

Ok. It's not. I changed my patch to

  // ... snip ...
  if (checkNested(MathJax, 'AuthorConfig', 'SVG', 'font') &&
      MathJax.AuthorConfig.SVG.font === 'STIX-Web') {
    let SVG = MathJax.OutputJax.SVG;
    SVG.Augment({FONTDATA: {VARIANT: {'bold-italic': {offsetA: 0x1D468}}}});
  }
});

And it works again. Sorry for the trouble,