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?
Best Answer
As @egreg said, it is quite easy to turn a Type 1 font into a TrueType or OpenType font with Fontforge. Depending on your operating system, Fontforge will be more or less integrated, but I have successfully used it on OS X and Linux Mint or Ubuntu (on Windows, I believe you will need to install Cygwin first). Once you have Fontforge, you can use its export function by selecting the appropriate menu item. You will probably be able to get all characters from the Type 1 font into the OpenType version.
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, thelibertine
package for example provides mappings for the Type 1 version for use withpdftex
and separate mappings for the OpenType version for use with XeTeX and LuaTeX.Furthermore, the
inputenc
andfontenc
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 modifiedfontenc
to use packaged Type 1 fonts with something that works like the traditionalT1
encoding. Lastly, it is important to note that theT1
(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 ofpdftex
. Type 1 is Adobe’s font format, whileT1
is the so-called Cork encoding that was developed as a standard in the early nineties by the TeX community.