# Proper way to use LaTeX fonts in XeLaTeX

What is the proper way to use LaTeX fonts, for example calligra or other fonts from the Font Catalogue in XeLaTeX.

Something like

``````\usepackage{fontspec}
\setromanfont{Calligra}
``````

doesn't work. However using it just like in pdflatex via

`\usepackage{calligra}` and `\calligra` works. So what's the best way to use LaTeX fonts from the Fonts Catalogue in XeLaTeX?

-
`\setromanfont` is obsolete and `\setmainfont` should be used. Apart from this, fonts declared via `fontspec`'s features should be OpenType or TrueType, which Calligra isn't. –  egreg May 20 '13 at 21:40
So I should just use it as I described it? What type of font is Calligra? –  student May 21 '13 at 8:18
Calligra is a traditional TeX font designed with Metafont; there is a Type1 version. It's not difficult to turn a Type1 font into an OpenType one, just use Fontforge; it will have no OpenType features, of course. –  egreg May 21 '13 at 8:36

The reason why this is necessary is that Type 1 fonts in `pdftex` are typically used with a package that provides metrics and encodings. If no equivalent package has been prepared for XeTeX or LuaTeX, the Type 1 font cannot be directly used, as it does not have the right mappings. By contrast, the `libertine` package for example provides mappings for the Type 1 version for use with `pdftex` and separate mappings for the OpenType version for use with XeTeX and LuaTeX.
Furthermore, the `inputenc` and `fontenc` packages are not meant for XeTeX, so one may not load them in order to use packaged Type 1 fonts with this engine. In other words, one may not arbitrarily mix packaged Type 1 and user-provided OpenType fonts in XeTeX. With LuaTeX, as I understand it, it is possible to use a modified `fontenc` to use packaged Type 1 fonts with something that works like the traditional `T1` encoding. Lastly, it is important to note that the `T1` (Text 1) font encoding and the Type 1 font format are two different things that happen to have confusingly similar names, even though they are often used together in the context of `pdftex`. Type 1 is Adobe’s font format, while `T1` is the so-called Cork encoding that was developed as a standard in the early nineties by the TeX community.