
Ich habe ein kleines Bedürfnis, Kapitälchen in Kursivschrift zu verwenden, und meine Schriftart hat keine. Also verwende ich fakeslant. Der folgende Code funktioniert mit lualatex, aber ich erhalte diese Warnmeldung:
LaTeX Font Warning: Font shape `TU/SourceSerifPro(0)/m/scit' undefined
(Font) using `TU/SourceSerifPro(0)/m/scsl' instead on input line 1
Kann ich etwas tun, um die Warnung zu unterdrücken?
\documentclass{article}
\usepackage{fontspec}
\setmainfont
[ UprightFont = *-Regular ,
ItalicFont = *-Italic ,
BoldFont = *-Semibold ,
BoldItalicFont = *-SemiboldIt ,
SlantedFont = SourceSerifPro-Regular,
SlantedFeatures = {FakeSlant=0.2},
]
{Source Serif Pro}
\begin{document}
\emph{\textsc{Hello}}
\end{document}
Antwort1
Sie können die Warnung ignorieren, was harmlos ist, oder \textsl
und \slshape
anstelle von \textit
und verwenden \itshape
. Oder Sie können die Schriftart für schräge Kapitälchen als Ihre Schriftart für kursive Kapitälchen einrichten:
\documentclass{article}
\usepackage{fontspec}
\setmainfont
[ UprightFont = *-Regular ,
ItalicFont = *-Italic ,
BoldFont = *-Semibold ,
BoldItalicFont = *-SemiboldIt ,
SlantedFont = SourceSerifPro-Regular,
SlantedFeatures = {FakeSlant=0.2},
ItalicFeatures = { SmallCapsFont = SourceSerifPro-Regular,
SmallCapsFeatures={Letters=SmallCaps, FakeSlant=0.2} }
]
{Source Serif Pro}
\begin{document}
\emph{\textsc{Hello}}
\end{document}