Bold monospace font extra-large
The \font
instruction should never be used with LaTeX. One of the reasons is what you discovered: the \btt
font you defined cannot be scaled with instructions such as \fontsize{43}{48}\selectfont
, because it is at a fixed size.
When one issues a font selection command, LaTeX looks in its internal tables and decides what font to use (remembering those it has already looked up and defined), finally issuing a \font<command>=<tfm-file>
assignment, if needed, and the command <command>
(for instance, \OT1/cmr/m/n/10
for the standard font). However this happens deep in the internals and the user should never rely on explicit font selection commands.
The rm-lmtk10
font is what lmodern
chooses (scaling it if necessary) when the user requests for
OT1 encoding,
lmtt
family (Latin Modern Typewriter), bold series, upright shape
as one can read from the entry in the ot1lmtt.fd
file:
\DeclareFontShape{OT1}{lmtt}{b}{n}
{<-> rm-lmtk10}{}
Therefore you can simply use the already defined infrastructure and say
\fontsize{43}{48}\usefont{OT1}{lmtt}{b}{n}
maybe defining a personal command such as
\newcommand{\btt}{\fontsize{43}{48}\usefont{OT1}{lmtt}{b}{n}}
Note that \usefont
issues internally \selectfont
so it's not needed after \fontsize
.
Loading lmodern
is better, but it's not required.
\documentclass{article}
\begin{document}
\fontsize{43}{48}\usefont{OT1}{lmtt}{b}{n}
\noindent
TEXT\\
\fontname\font % print the name of the current external font
\end{document}
Note: I used \font
, but just for accessing the name of the current font, not for defining a new one.
use another font, eg:
\documentclass[10pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{bera}
\begin{document}
{\ttfamily TEXT1}
{\fontsize{43}{48}\selectfont TEXT2}
{\fontsize{43}{48}\selectfont \ttfamily TEXT3}
\end{document}
if you prefer the Latin Modern then use instead
\documentclass[10pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
...