I'm a Canadian based in Berlin, Germany. My day job is a Technical Writer in the API space. I write about topics such as technology, usability, creative writing and Canadian history. All views mine. I tweet at @glennjlea. Read more about me here or at LinkedIn.
Site version: 3.0

You can define the base font for your document and provide font support for monospaced fonts and font size specifications. Normally, you add font packages to your project stylesheet. This allows them to be used in any document that uses the stylesheet.

Setting fonts in LaTeX is not an obvious task. It is, to be honest, rather cumbersome. So, let’s start with the basics.

Fonts are packages which you add using the `\usepackage` command. For example, `\usepackage{helvet}`.

Note: A good document about using fonts in LaTeX, see Font selection in LaTeX: The most frequently asked questions - PDF file.

## Setting base fonts for the entire document

For a project I used several fonts. I used Helvetica for the base font and Latin Modern as an alternate base font. Latin Modern is a set of true handmade vector fonts. In the stylesheet, I added the following commands.

The first two set the base fonts for the document. The third command changes the default family to sans serif.

## Using font declarations

You can add font declarations that are valid within the current scope in the document.

Note: Declarations mean they remain in effect until the end of the current group or environment. They are not like setting fonts in stylesheets, but are used throughout the document. Font families, series and shapes can be combined, for example `\bfseries\itshape` results in bold italic type.

You first add font declarations to allow you to select between pre-defined font families. Then within each font family you add declarations to select the type of font, such as weight, form, and so on.

You then add the following declarations within each font family by using the following:

Text strings can be formatted using the following:

To improve readability, you can add the microtype package. If it is used, options and settings need to be made. The PostScript font Adobe Courier is used for monospace text.

## Allowing relative font sizes

To allow relative font size specifications, (e.g. \smaller, \larger) the package relsize is used.

To control the fonts and formatting used in the table of contents, use the titles package and set the argument tocloft.

## Redefine line spacing

You can redefine the spacing to make the text more aesthetically appealing.

## Creating a courier text styles

You can create a courier text style and a default paragraph text style that can be applied as needed.

## Making dummy text available

You can make dummy text available to use in the document with the lipsum package.