I want to use the swash font from Minion Pro working with mathcal, like when using the package MinionPro. I can't find a way to add fontfeatures to mathfonts.
\documentclass{scrartcl}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\setmainfont[Microtype,Ligatures={TeX},Numbers=OldStyle]{Minion Pro}
\setsansfont[Microtype,Scale=MatchLowercase,Ligatures={TeX},Numbers=OldStyle,BoldFont={* SemiBold}]{Myriad Pro}
\setmonofont[Microtype,Ligatures={TeX},Scale=MatchUppercase]{Consolas}
\usepackage{lualatex-math}
\usepackage[math-style=ISO, bold-style=ISO, vargreek-shape=unicode]{unicode-math}
\setmathfont{Latin Modern Math}
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{Minion Pro Bold}
\setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{Minion Pro Bold Italic}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{Minion Pro Italic}
\begin{document}
$A \in \mathcal{A}$
\end{document}
I tried adding
\setmathfont[range=\mathcal,RawFeature={cswh}]{Minion Pro Italic}
or
\setmathfont[range=\mathcal,RawFeature={swsh}]{Minion Pro Italic}
but neither worked, the pdf showed only the normal italic version.
\setmathfontaccepts options like otherfontspecfont selection macros. – Khaled Hosny Jun 25 '12 at 19:57fontspec– Juri Robl Jun 25 '12 at 20:11RawFeature={+swsh}or use the higher level optionStyle=Swash. – Khaled Hosny Jun 25 '12 at 21:26\textit{ \addfontfeatures{RawFeature=cswh} A}works though. So the swash is in the font, I just can't get it out. – Juri Robl Jun 25 '12 at 21:40cswhwould work with lualatex in math mode, it might work with xelatex though (and please use the+sign, the fact it works without it is a pure luck). – Khaled Hosny Jun 25 '12 at 22:18