My question is closely related to this one.
I'm using pdfLaTeX and microtype
with AlegreyaSans as my sans serif font. I managed to adjust the answer given by Ulrike Fischer in the above question in so far, as the small caps are spaced out nicely in both the roman and the sans font in body text. In footnotes, however, tracking only works for the serif font. I've boiled the problem down to this MWE:
\documentclass{article}
\usepackage[osf]{AlegreyaSans}
\usepackage[tracking=true]{microtype}
\DeclareMicrotypeSet*[tracking]{mysmallcaps}{
encoding = *,
family = {rm*},
shape = {sc*, scit},
font = */AlegreyaSansSC-OsF/*/*/*
}
\SetTracking{
encoding = *,
shape = {sc*, scit},
family = {rm*},
font = */AlegreyaSansSC-OsF/*/*/*
}{500}
\begin{document}
Some \textsc{small caps} in roman.\footnote{Some \textsc{small caps} inside a footnote in roman.}
{\sffamily Some \textsc{small caps} in sans.}\footnote{\sffamily Some \textsc{small caps} inside a footnote in sans.}
\end{document}
Everything is fine in normal body text:
But footnotes break the tracking of the sans serif font:
What is happening here?