Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
1  
I don’t have the font. but \setmathfont accepts options like other fontspec font selection macros. – Khaled Hosny Jun 25 '12 at 19:57
I tried that, but maybe my attempts were just wrong... I'm really new to fontspec – Juri Robl Jun 25 '12 at 20:11
1  
It should be RawFeature={+swsh} or use the higher level option Style=Swash. – Khaled Hosny Jun 25 '12 at 21:26
Doesn't work either (I used it like above). \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:40
1  
I don’t think contextual features like cswh would 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
show 1 more comment

closed as too localized by lockstep, Marco Daniel, percusse, cgnieder, zeroth Sep 4 '12 at 18:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.