# Problematic font interactions

In one of my (big) projects of a few years ago, I was using fourier as the main font and roboto condensed as default sans-serif font (mainly used in (sub)section titles). This worked fine.

I tried to recompile the project today and I discovered that, among others, the italic and slanted styles are ignored. This seems to be due to an interaction between roboto condensed and fourier.

Here is a minimal working example that shows my problem:

\documentclass{memoir}

\usepackage{fourier}
\usepackage[condensed]{roboto}

\begin{document}
Test \textit{Test} \textsl{Test} \textbf{Test} $$Test$$ \textsf{Test}
\end{document}


Here is the output:

If I replace \usepackage[condensed]{roboto} by \usepackage{roboto}, then the output becomes:

As you can see, the latter work fine, but not the former. What am I doing wrong?

• A very similar question appeared yesterday. Quite likely the answers to tex.stackexchange.com/q/562105/4427 should help. – egreg Sep 11 '20 at 12:29
• Thanks a lot, I completely missed it. I'll see if this solves my problem. – Yvan Velenik Sep 11 '20 at 12:31
• @egreg : Both solutions there indeed solve my problem. Thanks a lot! What's the custom here, should I remove my question, as it is really a duplicate? – Yvan Velenik Sep 11 '20 at 12:37
• Not really a duplicate, because it requires a few more tricks to avoid spurious warnings. However, I marked my answer as “Community Wiki” to avoid “rep farming”. – egreg Sep 11 '20 at 12:45
• I’m voting to close this question because it was solved in the comments. – TobiBS Sep 11 '20 at 13:49

This is quite similar to Problems with italics in other font when using roboto condensed but requires a few more tricks in order to remove annoying spurious warnings. I added also a scaling for Roboto, which otherwise is taller than Fourier (actually Utopia).

\documentclass{memoir}
\usepackage[T1]{fontenc} % fourier does it, so it's best here

% avoid a spurious warning about cmr
\DeclareFontShape{T1}{cmr}{c}{n}{<->ssub*cmr/m/n}{} % avoid a spurious warning

% load roboto (but scaled because fourier is less tall)
\usepackage[scaled=0.9,condensed]{roboto}

% avoid a spurious warning about futs
\input{t1futs.fd}
\DeclareFontShape{T1}{futs}{c}{n}{<->ssub*futs/m/n}{} % avoid a spurious warning

\usepackage{fourier}

% fix the wrong setting by roboto
\renewcommand{\seriesdefault}{m}

\begin{document}

Test \textit{Test} \textsl{Test} \textbf{Test} $$Test$$ \textsf{Test}

\end{document}


Although you mention in the comments that you’re using PDFTeX, another solution is to load OTF versions of the fonts in LuaLaTeX (or XeLaTeX). You can load Erewhon Math as your Fourier replacement, through fourier-otf or unicode-math, and the OpenType version of Roboto with \setsansfont.

I would recommend using the modern toolchain when you can, and legacy 8-bit fonts when you have to. Upgrading will wipe out a lot of technical debt to old packages.