unicode-math
unicode-math copied to clipboard
adds to much space between mathcal symbol and subscript
Description
enabling unicode-math
adds to much space between mathcal symbol and subscript
info
- Relevant for XeTeX
- Relevant for LuaTeX
- Issue tracker has been searched for similar issues? Yes
Minimal example demonstrating the issue
\documentclass{article}
\usepackage[paperwidth=0.3in,paperheight=0.3in,top=1pt]{geometry}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\begin{document}
\noindent
\(\symcal F_j\)
\end{document}
Further details
I am using texlive version 2021.20220204-1 as packaged in Ubuntu
-
The spacing between the mathcal F and the subscript in the above example (using
XeTeX
) is as follows -
if I use
unicode-math
and I uselatin modern math
it is -
if I disable
unicode-math
it is as follows
results do not vary in a visible way by using LuaLaTeX
instead of XeTeX
IMHO the spacing in the first two cases is excessive, while the last one is fine.
In the current version (0.8q
with TeXLive 2022) the spacing is only excessive with Latin Modern.
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\setmathfont{latinmodern-math.otf}
\[F_j\qquad \symcal F_j\]
\setmathfont{texgyrepagella-math.otf}
\[F_j\qquad \symcal F_j\]
\setmathfont{STIXTwoMath-Regular.otf}
\[F_j\qquad \symcal F_j\]
\setmathfont{Asana-Math.otf}
\[F_j\qquad \symcal F_j\]
\setmathfont{LibertinusMath-Regular.otf}
\[F_j\qquad \symcal F_j\]
\setmathfont{Garamond-Math.otf}
\[F_j\qquad \symcal F_j\]
\end{document}
@marcin-serwin I guess you used LuaLeTeX since I can reproduce your result. XeLaTeX 3.141592653-2.6-0.999994 (TeX Live 2022) however gives excess spacing for STIXTwoMath as well:
This is an engine and/or font issue. For STIX Two Math, the script F has math kerning for positioning the subscripts but XeTeX is not applying it.
I tried again my initial example with a more recent version of LuaLaTeX ( This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian)
and it looks fine
wheras with XeLaTeX it is horrible (This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2022/dev/Debian)
If I use the standard font (and not Stix) then both xelatex and lulatex are horrible.
FYI, there is a bug in the OpenType spec. LuaTeX is following the letter of the spec, which gives better results here (due to bad font data) while XeTeX is following the intent of the spec and matches Microsoft implementation.
I reported an issue against an OpenType spec, and eventually LuaTeX will need to be fixed as well as the fonts, so you should report your issue to the individual fonts that are not behaving as expected.
The issue here should be close since there is no much unicode-math can do here.