I am trying to define a macro ro select the font for the code within the lstlisting (i.e., using listings package). I am referring to the answer from this question What is the least invasive way to set the font for listings?
So I am defining the macro as follows:
\makeatletter
\newcommand\BeraMonottfamily{%
\def\fvm@Scale{0.85}% scales the font down
\fontfamily{fvm}\selectfont% selects the Bera Mono font
}
\makeatother
So when I am using code like this, it works fine:
\begin{lstlisting}[basicstyle=\BeraMonottfamily]
...
\end{lstlisting}
However, I don't understand how to use the @Scale{0.85} in the macro. When I am changing the number inside the @Scale{}, nothing is changed. I thought it will change the font size but it does not.
Therefore, what does @Scale{0.85} mean? How to use it? Thank you.

\usepackage[T1]{fontenc}? – egreg Nov 14 '23 at 07:56