1

I'm using lxfonts in a beamer presentation, and I noticed that whenever I use \texttt{foo}, the typewriter font is much smaller than the regular font. I also noticed that the problem goes away if I use ${\tt foo}$ instead (but that's not really a solution) or if I don't use fontenc (but then the German umlauts look ugly). Is there a better solution?

Also, if I manage to get the height of the letters right (as described above), the lines of the typewriter letters' lines are thicker than the regular text, so the letters look like boldface. It would be nice if I could fix this too, but if that's not possible, I could live with that.

Thanks in advance for any help!

\documentclass[9pt]{beamer}

\usepackage[T1]{fontenc}
\usepackage{lxfonts}
\usefonttheme{professionalfonts}



\begin{document}
\begin{frame}{Text \texttt{Text}}

text {\tt text} \texttt{text} 

$text$ ${\tt text}$ $\texttt{text}$ 


\end{frame}
\end{document}
1

You can scale the fonts, but as you already remarked that makes them also bolder.

\documentclass[9pt]{beamer}
\usefonttheme{professionalfonts}

\usepackage[T1]{fontenc}
\usepackage{lxfonts}

\DeclareFontFamily{T1}{llcmtt}{\hyphenchar\font-1}
\DeclareFontShape{T1}{llcmtt}{m}{n}{<-> s*[1.22]ec-lmtt10}{}
\DeclareFontShape{T1}{llcmtt}{m}{it}{<-> s*[1.22]ec-lmtti10}{}
\DeclareFontShape{T1}{llcmtt}{m}{sl}{<-> ssub* llcmtt/m/it}{}
 \DeclareFontShape{T1}{llcmtt}{bx}{n}{<-> ssub* llcmtt/m/n}{}
 \DeclareFontShape{T1}{llcmtt}{bx}{it}{<-> ssub* llcmtt/m/it}{}
 \DeclareFontShape{T1}{llcmtt}{bx}{sl}{<-> ssub* llcmtt/m/it}{}

\begin{document}

\begin{frame}{Text \texttt{Text}}

text {\tt text} \texttt{text}

\end{frame}
\end{document}

enter image description here

  • Thanks! I'll go with this solution. – Jan Jul 18 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.