latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
243 stars 28 forks source link

Accesing Stylistic Sets #323

Open uhoefel opened 8 years ago

uhoefel commented 8 years ago

Consider the following MnWE:

\documentclass{scrartcl}
\usepackage{unicode-math}
\setmathfont{MinionPro-It}[range={scr,bfscr,cal,bfcal},StylisticSet={1}]

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{equation}%
\mathscr{AB} = \mathcal{AB}AB
\end{equation}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

While the output is set in Minion Pro, the swashes are not used. This worked until recently. I have an up-to-date MikTex. Is there a possibility to access the swashes?

E: also on stackexchange: http://tex.stackexchange.com/questions/269064/accesing-stylistic-sets-with-unicode-math

wspr commented 8 years ago

Are you using XeLaTeX or LuaLaTeX? I can't guarantee a quick fix I'm afraid... Does the log file provide any information about what features are selected (or not) with the font?

uhoefel commented 8 years ago

LuaLaTeX 0.80.0. See the log @ http://pastebin.com/uZ4HKnV4

chrisjbillington commented 8 years ago

I get this too. The problem occurs in LuaLaTeX but not XeLaTeX.

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\setmathfont[range=cal,Contextuals=Swash]{Minion Pro Italic}

\begin{document}
$\mathcal{F}^{-1}\{i\mathbfit{k} \mathcal{F}\{\psi\}\} = \mathbfup{\nabla}\psi$
\end{document}

LuaLaTeX beta-0.80.0: image

XeLaTex 3.14159265-2.6-0.99992: image

Logfile for LuaLaTeX here:

http://pastebin.com/3E7PjDqN

I can't use XeLaTeX due to to other bugs, so for the moment I'm using this workaround:

\documentclass{article}
\usepackage{unicode-math}

\usepackage{mathtools}
\newfontface\swash[Contextuals=Swash]{Minion Pro Italic}
\renewcommand\mathcal[1]{\mathmbox{\textrm{\swash #1}}}

\begin{document}
$\mathcal{F}^{-1}\{i\mathbfit{k} \mathcal{F}\{\psi\}\} = \mathbfup{\nabla}\psi$
\end{document}

Which defines a text font face and overrides \mathcal to use it in math mode (the mathmbox is required for sensible alignment with superscripts etc). It only works for one character at a time this way though, since using swashed contextuals on text mode only applies to initial and final characters in a word.

wspr commented 6 years ago

@uhoefel / @chrisjbillington — would you be able to confirm whether this problem still exists? Especially if you could reproduce using freely available fonts (EBGaramond?) that would be really helpful.