LaTeX remembers the default font family for \ttfamily
in macro \ttdefault
.
The default for \ttdefault
in LaTeX (and KOMA-Script) without any other font packages is cmtt
and addresses the teletype font of the Computer Modern fonts.
Other examples:
lmvtt
: variable width teletype font of Latin Modern fonts
qcr
: TeX Gyre Cursor (similar to Courier)
Manually the font family for \ttfamily
can be redefined, e.g.:
\renewcommand*{\ttdefault}{qcr}
Often there are font packages that take care of this and some other things. For example, TeX Gyre Cursor can be enabled by package tgcursor
:
\usepackage{tgcursor}
Users of XeTeX and LuaTeX that support Unicode and OpenType fonts can use package fontspec
and its possibilities to define and setup teletype fonts (e.g. \setmonofont
).
\renewcommand{\ttfamily}{\rmfamily}