[Tex/LaTex] setting fonts with XeTeX+fontspec

fontspecxetex

I am using Archlinux, emacs, XeLaTeX. I have some related problems.

  1. I like the utopia font of the fourier package that I used to use before converting to XeTeX. Now, fontspec resets the font set by fourier.

  2. When trying setting the font by fontspec as the example below, fontspec does not find the font!

  3. Other fonts are found by fontspec but with ONLY using the Path option, although the font is found by fc-list.

MWE:

\documentclass[a4paper,10pt,article,twoside]{memoir}

\usepackage{fourier}
\usepackage{fontspec}
%\setmainfont{Adobe Utopia}
%\setmainfont{Utopia}[Path = /usr/share/fonts/Type1/]
\setmainfont{UTRG____.pfa}[Path = /usr/share/fonts/Type1/]

\begin{document}

This is to see whether it works.

\end{document}

Best Answer

If you want to keep using your old font, it still works with XeLaTeX. Just do not load fontspec.

The problem with loading Adobe Utopia via fontspec is the font format: UTRG____.pfa is a pfa file, this is an ASCII encoded font. To use the font with TeX, you need a binary font (.pfb). While you could convert the existing file with t1binary, the binary encoded Type1 Utopia font is already installed with TeXLive under the filename putr8a.pfb.

So to load the Type1 font with fontspec, use

\setmainfont{putr8a}[Extension = .pfb]

Then again, with XeLaTeX it would be better to use an Opentype version of the font. A free OpenType font derived from Adobe Utopia and available in TeX is Heuristica, so you should try

\setmainfont{Heuristica}

to get all the advantages of a Unicode based engine like XeLaTeX with a Utopia like font.