stipub / stixfonts

OpenType Unicode fonts for Scientific, Technical, and Mathematical texts
SIL Open Font License 1.1
730 stars 41 forks source link

Bad positioning of subscripts #222

Open svstoy opened 3 years ago

svstoy commented 3 years ago

This may be related to already reported issues. The subscript of N, U, V, W, Y seems misplaced. In the presence of a superscript, the issue seems to disappear except that the subscript of P appears to be too close. The following code replicates the problem.

\documentclass[11pt]{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}

\begin{document}

    $N_j, P_j,  U_j, V_j, W_j,Y_j$

    $N_j^{k},P_j^{k}, U_j^{k}, V_j^{k}, W_j^{k}, Y_j^{k}$

\end{document} 

image

Compare to Latin Modern:

image

tiroj commented 3 years ago

Can you confirm in which version of which software you are testing and getting these results?

Complete review and revision of math –script kerning has been part of the v2.20 work nearing completion for release in the first part of 2022. So you should see general improvements in this area. However, the fact that your results are so different depending on whether a superscript is present concerns me, because that isn’t how MATH table cut-in kerning is supposed to apply, which may indicate an interpretation error in the software.

svstoy commented 3 years ago

Thank you for the quick response. Here is the beginning of the log-file, I just re-ran it. I hope it contains enough information:

This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021/W32TeX) (preloaded format=xelatex 2021.11.24) 25 NOV 2021 17:25 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **bug_stix2.tex (./bug_stix2.tex LaTeX2e <2021-11-15> L3 programming layer <2021-11-22> (c:/texlive/2021/texmf-dist/tex/latex/base/article.cls Document Class: article 2021/10/04 v1.4n Standard LaTeX document class (c:/texlive/2021/texmf-dist/tex/latex/base/size12.clo File: size12.clo 2021/10/04 v1.4n Standard LaTeX file (size option) )

davidmjones commented 2 years ago

The presence of the superscript shifts the subscript further down, which presumably is moving it into a different cut-in zone in these cases.

I don't remember reviewing the vertical placement of scripts when I investigated the kerning. It might be worth revisiting those once we've tested the new STIX Two cut-ins.

xsrvmy commented 2 years ago

Should note that the shifting issue is not a problem with lualatex.

Firestar-Reimu commented 2 years ago
\documentclass{article}
\usepackage{fontspec}
\setmainfont{STIX Two Text}
\usepackage{unicode-math}
\unimathsetup{mathrm=sym,mathbf=sym,mathsf=sym,bold-style=ISO}
\setmathfont{STIX Two Math}
\begin{document}
\[
    P_i \mathbf{V}_j \mathrm{F_6}
\]
\end{document}

Screenshot_20221017_144349

I compile this with lualatex and stix v2.13 b171

but the kerning is still very awful

xsrvmy commented 2 years ago

What version of lualatex are you on? The problem you are having also seems to be the opposite of the one posted here.

Firestar-Reimu commented 2 years ago

I use the latest version of lualatex

$ lualatex --credits
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)

The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.

LuaHBTeX merges and builds upon (parts of) the code from these projects:

tex       : Donald Knuth
etex      : Peter Breitenlohner, Phil Taylor and friends
omega     : John Plaice and Yannis Haralambous
aleph     : Giuseppe Bilotta
pdftex    : Han The Thanh and friends
kpathsea  : Karl Berry, Olaf Weber and others
lua       : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo
metapost  : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends
pplib     : Paweł Jackowski
fontforge : George Williams (partial)
luajit    : Mike Pall (used in LuajitTeX)

Compiled with libharfbuzz 3.4.0; using 3.4.0
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.6
Compiled with mplib version 2.02
Compiled with zlib 1.2.11; using 1.2.11

Development id: 7509

I WANT STIX 2.20!!!

davidmjones commented 2 years ago

I WANT STIX 2.20!!!

We all want STIX 2.20. The problems are that there is a lot of work involved in reviewing kern pairs and I have had very little time to devote to it this year. If possible I'll try to get a release with improved kerning for at least the most common cases out around the turn of the year.