MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Bug: Invalid glyph displayed for character

Open balagge opened this issue 7 years ago • 1 comments

Issue Summary

Character [U+2246 ≆ APPROXIMATELY BUT NOT ACTUALLY EQUAL TO] is displayed incorrectly by default.

Steps to Reproduce

E.g. in the online demo version at https://www.mathjax.org/#demo the following MathML renders all 3 occurrences (verbatim, hexadecimal / named entity) of the character incorrectly.

<math>
  <mi>a</mi>
  <mo>≆</mo>
  <mi>b</mi>
  <mo>&#x2246;</mo>
  <mi>c</mi>
  <mo>&simne;</mo>
  <mi>d</mi>
</math>

Expected rendering

The expected / correct glyph should be similar to the example below:

http://www.fileformat.info/info/unicode/char/2246/approximately_but_not_actually_equal_to.png

Actual rendering

What is actually displayed is the glyph of another character, [U+2247 ≇ NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO]:

http://www.fileformat.info/info/unicode/char/2247/neither_approximately_nor_actually_equal_to.png

Technical details

  • MathJax Version: current demo version
  • Client OS: Ubuntu 14.04
  • Browser: Firefox / Chromium
  • Renderer: HTML-CSS, Common HTML, SVG

Note: the preview HTML and the MathML renderer (if using Firefox, which has built-in MathML rendering) displays a correct glyph. So this is probably a font error.

balagge avatar May 17 '18 11:05 balagge

Indeed, the glyph is in the wrong location in the font. Unfortunately, the MathJax TeX font doesn't contain a glyph for U+2246, so (once the glyph is put in the right location), you would have to rely on the user's installed system fonts to obtain U+2246 if you are using the default MathJax TeX fonts.

Alternatively, you could specify the STIX fonts (for HTML-CSS and SVG output), or the LatinModern fonts if you want the look to be that of the Computer Modern fonts.

dpvc avatar May 22 '18 15:05 dpvc