MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

v3 different spacing of italic kanji when switching CHTML to SVG

Open hbghlyj opened this issue 2 years ago • 1 comments

Steps to Reproduce:

  1. use chtml renderer, \textit{數學分析}
  2. switch to svg
  3. observe the spacing is different

Screen recording

output

Technical details:

  • MathJax Version: 3.2.2
  • Browser: Firefox

I am the default MathJax configuration, and loading MathJax via

<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
\(\textit{數學分析}\)

Supporting information:

  • Please supply a link to a (live) minimal example page: https://jsbin.com/tigodegutu/edit?html,output

hbghlyj avatar Feb 10 '24 21:02 hbghlyj

This is due to the fact that CHTML output groups characters that are not in the MathJax fonts into a single DOM element, while SVG output does not. This is fixed in v4 (mathjax/MathJax-src#903). For now, if you set mtextInheritFont: true in the chtml and svg blocks of your MathJax configuration, that will cause the spacing to be the same.

dpvc avatar Feb 12 '24 13:02 dpvc