I wrote an article about font sizes in LaTeX, which has become a hugely popular post. Other features of a font can be summarized as its style. The font style describes whether a font is with decorations (serif) or without (sans serif) as well as other features of its appreance (bold, italic, etc.). These features are available through specific commands in LaTeX. In this post, I introduce these commands which provide access to fonts with different styles.
Basics
A font has different features of appearance. These include its size, width, italicization, slant (skewness), ornamentation, etc.. A font describes a single set of letters (elements of the alphabet) with the same style. Different styles and therefore fonts with similar design features are summarized in a font family.
See Typeface on Wikipedia for more details on fonts and font families.
Decorations (serif and sans serif)
Serifs are small features at the end of letter strokes. The default LaTeX font Computer Modern has serifs. The following commands can be used to change to a font without serifs (sans serif) and vice-versa (serif/roman).
% Removing serifs (sans serif font) \sffamily \textsf{...} %Adding serifs (serif/roman font) \rmfamily \textrm{...}
\documentclass[11pt]{article} \begin{document} \noindent Lorem ipsum dolor sit amet,... \noindent \textsf{Lorem ipsum dolor sit amet,...} \noindent\sffamily Lorem ipsum dolor sit amet,... \noindent \textrm{Lorem ipsum dolor sit amet,...} \noindent\rmfamily Lorem ipsum dolor sit amet,... \end{document}
Proportions
Most fonts are proportional fonts, meaning that letters occupy different widths. Whereas letters of monospace fonts occupy the same width. In LaTeX, these are called typewriter or teletype (tt) fonts. These commands switch between monospace and proportional fonts:
% Monospace/typewriter font \ttfamily \texttt{...} % Normal font \normalfont \textnormal{...}
Series design features (bold)
In TeX/LaTeX, the font series distinguishes between normal and bold font styles. These are the commands to switch between bold and normal fonts:
% Bold font \bfseries \textbf{...} % Normal font \mdseries \textmd{...}
Shape design features (italic, slant, small caps)
Shape design features include normal, italic, slant, and small capitals. Slant is a skewed version of the normal/up font whereas italic has a different letter shape.
% Normal/up font \upshape \textup{...} %Italic \itshape \textit{...} %Slant \slshape \textsl{...} %Small capitals \scshape \textsc{...}
Note that not all font families have a slant or an italic shape. In that case, both commands produce the font that is available (italic or slant).