Writing Cyrillic letters in bold with CM-like fonts

boldcyrillicfont-encodingsinput-encodingsrussian

I'm trying to write bold Cyrillic letters in my document but can't achieve a satisfactory solution.

I found an example on CTAN.org with source code here using the substitutefont package.

What I want to do is write Cyrillic with a CM-like font, just as they did on the "bf" line of the PDF. What I have so far :

\documentclass[11pt,a4paper]{exam}

\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,french]{babel} 
\usepackage{lmodern}

%%%%%%% Other packages used %%%%%%%
\usepackage[style=ddmmyyyy,datesep=/]{datetime2} % Pour formater la date
\usepackage{graphicx} % Pour l'import d'image
\usepackage[export]{adjustbox} % Pour l'alignement des images
\usepackage{tikz} % Pour créer des graphes
\usepackage{tabularx} % Extension pour les tables (tabular)
\usepackage{enumitem} % Extension pour les listes (itemize)
\usepackage{svg} % Pour importer des images SVG
\usepackage{multicol} % pour afficher des portions de textes sur plusieurs colonnes
\setlength{\columnsep}{2.5cm}
\usepackage{caption}
\usepackage{makecell}
\usepackage{tcolorbox}
\usepackage{amsmath}
\usepackage{alltt}
\usepackage{colortbl}
\usepackage{zref-savepos}
\usepackage{multirow}
\usepackage{xhfill}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{substitutefont}

\substitutefont{T2A}{lmr}{fcm}
\substitutefont{T2A}{lmss}{fcs}
\substitutefont{T2A}{lmtt}{fct}

% [...] %

% Used to write answers in red and bold
\printanswers\unframedsolutions\SolutionEmphasis{\bfseries\color{red}}\renewcommand{\solutiontitle}{}\CorrectChoiceEmphasis{\bfseries\color{red}}

\begin{document}

% [...] %

\pointsinrightmargin
    \noindent En répondant correctement à cette question bonus, vous pouvez obtenir directement la note maximale de $\frac{10}{10}$. Malheureusement elle n'est pas écrite en français.
    \qformat{\textbf{Question Bonus} \thequestiontitle(\thepoints) :\hfill}
    \begin{questions}
        \titledquestion{}[10]
        % "Тим Бернерс-Ли" doesn't show up in bold
        \foreignlanguage{russian}{Кто изобрел Всемирную паутину?} \ifprintanswers \fillin[\foreignlanguage{russian}{Тим Бернерс-Ли} (Tim Berners-Lee)][9.15cm] \else \hrulefill \fi
    \end{questions}
\end{document}

So I'm using the exam document class and use the command \printanswers to write down answers in red and bold. It works perfectly for Latin text but the Russian text doesn't show up in bold.

I used the example I found on CTAN.org but it doesn't seems to work. I keep getting these errors:

No declaration for shape T2A/fcm/m/n.
sub@sfcnt …e forspace shapespace mandatory@arg }
No declaration for shape T2A/fcm/bx/n.
sub@sfcnt …e forspace shapespace mandatory@arg }

What's wrong with my code?

Best Answer

Use the la fonts (the Cyrillic version of cm):

\documentclass[11pt,a4paper]{exam}

\usepackage[T2A,T1]{fontenc}
\usepackage[russian,french]{babel} 
\usepackage{lmodern}
\usepackage{xcolor}

\DeclareFontFamilySubstitution{T2A}{lmr}{cmr}
\DeclareFontFamilySubstitution{T2A}{lmss}{cmss}
\DeclareFontFamilySubstitution{T2A}{lmtt}{cmtt}

% [...] %

% Used to write answers in red and bold
\printanswers
\unframedsolutions
\SolutionEmphasis{\bfseries\color{red}}
\renewcommand{\solutiontitle}{}
\CorrectChoiceEmphasis{\bfseries\color{red}}

\begin{document}

\pointsinrightmargin

\noindent En répondant correctement à cette question bonus, vous pouvez 
obtenir directement la note maximale de $\frac{10}{10}$. Malheureusement 
elle n'est pas écrite en français.

\qformat{\textbf{Question Bonus} \thequestiontitle(\thepoints) :\hfill}

\begin{questions}
  \titledquestion{}[10]
  % "Тим Бернерс-Ли" doesn't show up in bold
  \foreignlanguage{russian}{Кто изобрел Всемирную паутину?} 
  \ifprintanswers
    \fillin[\foreignlanguage{russian}{Тим Бернерс-Ли} (Tim Berners-Lee)][9.15cm]
  \else
    \hrulefill
  \fi
\end{questions}

\end{document}

enter image description here

But I get a very similar result with

\DeclareFontFamilySubstitution{T2A}{lmr}{fcm}
\DeclareFontFamilySubstitution{T2A}{lmss}{fcs}
\DeclareFontFamilySubstitution{T2A}{lmtt}{fct}

enter image description here

Related Question