|  |  | 11 Using Truetype fonts

# 11 Using Truetype fonts

To make PDF presentations that are as "fancy" as the PowerPoint presentations of competing speakers one needs to use fancy fonts. It's not hard to find nice fonts, but they are mostly in Truetype (TTF) format. This section explains how to use TTF fonts in Ipe.

Ipe relies on Pdflatex to translate the text source representation into a string of PDF operators and font subsets, that can then be used to generate Postscript, PDF, and to display the text on the screen. Ipe can therefore use any font that Pdflatex can handle, and to use a TTF font we just have to add it to Pdflatex's font reportoire.

I've made a webpage explaining the steps necessary to add a TTF font to Pdftex's font repertoire, using the lhandw.ttf font as an example. Let's assume that you have performed these steps, and that you can access the font when running Pdflatex normally (not from Ipe).

We are then ready to try the font from within Ipe. Let's first assume you only want to use the new font in a few places in your Ipe document. You should define a command analogous to `\textrm` to switch to the new font. Open the Document properties dialog in the Edit menu, and add this line to the Latex preamble:

    \DeclareTextFontCommand{\textlh}
    {\fontencoding{T1}\fontfamily{lhandw}\selectfont}

You can now use `\textlh` inside Ipe text objects to typeset in Lucida-Handwriting.

Finally, let's make a multi-page presentation typeset wholly using Lucida-Handwriting. This declaration in the Latex preamble will change the document fonts:

    \renewcommand{\encodingdefault}{T1}
    \renewcommand{\rmdefault}{lhandw}
    \renewcommand{\sfdefault}{phv}
    \renewcommand{\ttdefault}{pcr}

Note that this switches all text fonts to TTF or Postscript fonts. This is necessary, as we use the `T1` encoding (an 8-bit encoding) for Lucida-Handwriting. Keeping Computer-Modern as the font for `\textsf` or `\texttt` would cause LaTeX to load the `T1` version of Computer-Modern. These are bitmapped "Type3" fonts, which Ipe cannot handle.

|  |  | 11 Using Truetype fonts