stipub / stixfonts

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

Wrong positioning of \vec at sizes 8pt or less #205

Open isaacsb opened 3 years ago

isaacsb commented 3 years ago

Since at least release 2.10, \vec (also \overrightarrow with single character) is too much to the left at font sizes 8pt or less. Same results with lualatex and xelatex (using unicode-math). Haven't tried with Word or plain TeX. Same results when in subscript at 12pt or less.

It does not happen with \overleftarrow.


Example:

\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\newcommand\testa[1]{\fontsize{#1}{18}\selectfont {#1}pt: $\vec{v}$}
\newcommand\testb[1]{\fontsize{#1}{18}\selectfont {#1}pt: $\partial_{\vec{v}} f$}
\begin{document}
\testa{7} \quad \testa{8} \quad \testa{9} \quad \testa{10} \quad \testb{10} \quad \testb{11} \quad \testb{12} \quad \testb{13}
\end{document}

Using version 2.02 b142: v2 02-b142 v2.02-b142.pdf

Using version 2.12 b168a (also 2.10+): v2 12-b168a v2.12-b168a.pdf

tiroj commented 3 years ago

Thanks. Will review possible causes for this issue and plan a fix for either v2.20 or an intermediate bug fix release. Strange that it is only affecting some sizes.

firai commented 3 years ago

By the way, this doesn't seem to be an issue with Word: Small Vec Word 1st line: 11 pt. 2nd line: 7 pt.

(Produced with STIX Two Math 2.12 b168a and Word 16 [a.k.a. Office 365])

tiroj commented 3 years ago

Will check for related MATH table settings, but if this is not happening in MS Word then possibly the issue is in the TeX flavours?

davidmjones commented 3 years ago

Will check for related MATH table settings, but if this is not happening in MS Word then possibly the issue is in the TeX flavours?

Yes. This is related to #162. By default, the unicode-math package used by both XeTeX and luaTeX turns on the ssty1 feature for any font sizes between 7 and 10pt. [Sorry for not twigging on to the relevance of that to this issue sooner.]

tiroj commented 3 years ago

Yikes! So this is something that probably will end up getting fixed in the v2.20 work, as a free rider on improved ssty glyph support.