# [Tex/LaTex] How to change the \texttt font

typewriter

This question is the most similar to my own, but it was closed before anyone could answer it. Looking here there are quite a few "Typewrite" fonts built into LaTeX. I was wondering what the default font is for \texttt, and how I would go about changing the font to one of the others on this list.

It looks like you can just use the package, for example:

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


You can also use (assuming the font is available):

\renewcommand*{\ttdefault}{(font name)}


With fontspec, you can also use:

\usepackage{fontspec}
\setmonofont{⟨font name⟩}[⟨font features⟩]