mathjax / MathJax-node

MathJax for Node
Apache License 2.0
614 stars 96 forks source link

Double Stroke generates some letters in bold #414

Closed wrvc3000 closed 6 years ago

wrvc3000 commented 6 years ago

Hi!

Thanks for this library, it's awesome.

We are having an issue with a couple of double struck letters

For an ascii-math text like this: ​'NN\ \ ' 'QQ\ \ ' 'ZZ\ \ ' 'CC\ \ ' 'RR\ \ '​​​

We are getting two bold letters like this:

screen shot 2018-06-08 at 08 43 58

We expected letters like this:

screen shot 2018-06-08 at 09 35 18

(Source: http://asciimath.org/)

What could be happening?

Thanks!

Tech details: Rendered server side via API mathjax-node 2.1.1 nodejs 8 SVG output Neo-Euler font Chrome Browser macOS High Sierra

dpvc commented 6 years ago

The issue here, as in your comment in #414, is that the Neo-Euler font does not contain any double-struck characters, and so mathjax-node has to call on system fonts to obtain them. MathJax doesn't get to determine what fonts they are taken from, and it appears that the Q and C are coming from one font (a sans-serif font), while the others are coming from a different font. Note that the results may vary from reader to reader, since it is based on the fonts installed on their system (and how the operating system handles locating the characters in the available fonts).

You may want to choose one of the other fonts rather than Neo-Euler, or alternatively, use bb(R), bb(C), etc. to get bold versions rather than black-board bold.

Note that all five in your example are double-struck character, and none are bold. It's just that they are not all from the same font, and the sans-serif font for the Q and C is a heavier look than the serifed font for the others.

wrvc3000 commented 6 years ago

Got it, thanks for your answer. We will try TeX font and see what happens.

wrvc3000 commented 6 years ago

Looks good now, using TeX font. Thanks!

screen shot 2018-06-13 at 15 31 44