This is a follow-up question of this answer, which provides a FakeSlant-based method for providing bold italics for Iconsolata using XeLaTeX or LuaLaTeX (with fontspec).
The original method works, but when specifying Extension = .otf, or using iconsolata as the font name (because there is inconsolata.fontspec in the inconsolata-zi4 package), the fake slant for bold italics fails.
Consider the following MWE:
\documentclass{article}
\usepackage{fontspec}
% this works
% \setmonofont{Inconsolatazi4}[
% AutoFakeSlant,
% BoldItalicFeatures={FakeSlant},
% ]
% this does not work
\setmonofont[
AutoFakeSlant,
BoldItalicFeatures={FakeSlant},
]{inconsolata}
% this does not work either
% \setmonofont[
% UprightFont = -Regular,
% BoldFont = -Bold,
% AutoFakeSlant,
% BoldItalicFeatures={FakeSlant},
% Extension=.otf
% ]{Inconsolatazi4}
\begin{document}
\ttfamily
Regular
\textbf{Bold}
\textsl{Slanted}
\textit{Italics}
\textbf{\textsl{BoldSlanted}}
\textbf{\textit{BoldItalics}}
\end{document}
Not Working:
Working:



BoldSlantedFeaturesin addition toBoldItalicFeatureswill address the issue, and also stop the warning of fallback. – Teddy van Jerry Feb 02 '24 at 15:12