Unicode-Math in LuaLaTeX and XeLaTeX
Dear LuaTeX and XeTeX teams, it seems that recent versions of LuaLaTeX and XeLaTeX contain some issues regarding the rendering of opentype fonts using the unicode-math package. I have already contacted Will Robertson about these bugs because I supposed the unicode-math package could cause them. According to Will the math rendering is done by the engines and not by unicode-math. This is why I am contacting you now. The first issue is the usage of the staircase kerning boxes of opentype math fonts. They are obviously not applied in expressions like $f_j$ using LuaLaTeX. The index is rendered too far away from the glyph. If we use XeLaTeX we get the correct output. The second issue is present in both LuaLaTeX and XeLaTeX. If we have an index together with an exponent like j the index is rendered too high – in fact it is risen compared to the expression that uses an index only. A typical example is $f_n^j$. I have prepared a minimal example that shows the problems and have attached it and the outputs using the current versions of LuaLaTeX and XeLaTeX contained in TeXLive. For the sake of completeness it should be mentioned that ConTeXt using the LuaTeX engine as well does not show any of these issues. This leads me to the conclusion that either LuaLaTeX does not use the most recent version of LuaTeX or that the issues are not caused by the engine itself. Maybe you have a clue what leads to the bugs I mentioned. I hope they can be solved soon. Kind regards, Mathias Schickel
The first issue is the usage of the staircase kerning boxes of opentype math fonts. They are obviously not applied in expressions like $f_j$ using LuaLaTeX. The index is rendered too far away from the glyph. If we use XeLaTeX we get the correct output.
It works okay with luatex 1.09 (miktex or dev-TeXLive), but fails in a current texlive 2018.
The second issue is present in both LuaLaTeX and XeLaTeX. If we have an index together with an exponent like j the index is rendered too high – in fact it is risen compared to the expression that uses an index only. A typical example is $f_n^j$.
The sup/sub pair is higher placed than with context. You could move it down (at least with luatex) with \documentclass{article} \usepackage{unicode-math} \setmathfont{Cambria Math} \begin{document} $f_n^j$ \Umathsupsubbottommax\textstyle =2pt $f_n^j$ \end{document} unicode-math could probably offer some option to set this. -- Mit freundlichen Grüßen Ulrike Fischer mailto:luatex@nililand.de
Am 12.12.2018 um 12:06 schrieb Ulrike Fischer
: The first issue is the usage of the staircase kerning boxes of opentype math fonts. They are obviously not applied in expressions like $f_j$ using LuaLaTeX. The index is rendered too far away from the glyph. If we use XeLaTeX we get the correct output.
It works okay with luatex 1.09 (miktex or dev-TeXLive), but fails in a current texlive 2018.
Okay, that is good news. How can I receive the required luatex file? I am on a Mac and TeXLive is the standard distribution there. Till now I did not know anything of dev-TeXLive and how to install it. Would it be possible to simply send the current luatex 1.09 file to me so that I can replace the file in the standard distribution? Or would that require more complicated actions?
The second issue is present in both LuaLaTeX and XeLaTeX. If we have an index together with an exponent like j the index is rendered too high – in fact it is risen compared to the expression that uses an index only. A typical example is $f_n^j$.
The sup/sub pair is higher placed than with context. You could move it down (at least with luatex) with
It is obvious that the higher placement in LuaLaTeX and XeLaTeX cannot be intended and thus should be considered as a bug. Have a look at the attached file. This time I have chosen Latin Modern Math because it is a little bit more significant there. Notice that $f_n$ and even $f_n^m$ have the correct and standard placement while $f_n^j$ shows the higher placement of the index $n$. There is no reason why the $n$ should be placed higher if the exponent is $j$ instead of $m$. On the contrary it would make much more sense if the $n$ would be placed lower(!) and not higher if the exponent goes below the baseline and has a descender height > 0.
\documentclass{article} \usepackage{unicode-math} \setmathfont{Cambria Math} \begin{document} $f_n^j$
\Umathsupsubbottommax\textstyle =2pt $f_n^j$ \end{document}
unicode-math could probably offer some option to set this.
Maybe this could be a workaround as long as the bug persists. Has anyone an idea how this could be done as standard procedure using unicode-math?
-- Mit freundlichen Grüßen Ulrike Fischer mailto:luatex@nililand.de
Kind regards, Mathias Schickel
participants (2)
-
Mathias Schickel
-
Ulrike Fischer