# How do I use an OpenType font with my LaTeX document?

I want to use a really cool open-source OpenType font with my LaTeX document.

I was told that either I could go through a long process of converting the OpenType font to one useable by LaTeX, or I should instead switch to using XeTeX.

Is there a way for me to use an unmodified OpenType font with my LaTeX document (and existing LaTeX installation)?

-
possible duplicate of Installing TTF fonts in latex –  Dima Jul 28 '10 at 14:34

Switch to XeTeX:

1. Change your invocations of `pdflatex` to `xelatex`.
2. `\usepackage{xltxtra}` at the beginning of your preamble (some XeTeX goodies, in particular it also loads `fontspec`, which is needed for font selection).
3. `\setmainfont{Name of OTF font}` in the preamble.
4. No step 4.

It’s as easy as that.

Drawback: you lose the advantages of the `microtype` package. Ah, and be sure to use UTF-8 as your source encoding, and remove any `\usepackage{inputenc}` declarations.

-
You also have to remove \usepackage{fontenc} declarations. See tex.stackexchange.com/q/2984/1035 –  Mateus Araújo Sep 11 '10 at 5:59

As far as I know you should install it as a system font. Such that it becomes available in system settings for UI fonts, web-browser and all apps. On Mac OS X and Linux (Gnome at least) it is simple as double clicking the downloaded font.

After that you can use fontspec & Xe(La)TeX to select that font by name (note that font name can be different from the file name).

If you don't want to install the font as a system font, you can drop the font into the same folder as your tex document and xelatex should be able to find it.

To use OpenType and TrueType fonts with tex, latex (for dvi, dvi-ps, dvi-ps-pdf workflow) special font metrics will need to be generated and font map installed. Unfortunately I'm on a quest to find out how to properly do it.

Note that using "cool fonts from the web" might not be of high quality as highly engineered fonts. The Latin Modern has something like more than 50 complete fonts to cover different weights, italics, maths and special ligatures. None of the other fonts come close for exploiting latex typography power. Commercial fonts from Adobe, Apple, Microsoft are usually of high typographical quality and are more complete.

-