# Can't find Metrics for opentype font; why does XeTeX need them?

I want to use an OpenType font for a document, so I'm trying to compile it with xelatex. I followed the answers on this question:

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

However, when I try to compile it, it still gives me an error complaining it can't find the metrics file. But why does it need one? Can't I just use the .otf file without converting it?

-
If you are getting something like Metric (TFM) file or installed font not found, this actually means that XeLaTeX/fontspec couldn't find the .otf (or .ttf) file. It also means that you are using an old version of fontspec, because the current version of has a much more helpful error message. –  Caramdir Nov 3 '11 at 2:04
I renamed the otf file to OpenBaskerville, put it into the document working directory, and put exactly OpenBaskerville into the "setmainfont" command. Now I'm getting this error message: ! Undefined control sequence. \zf@set@font@type ...onttype \zf@basefont \zf@tfm \or \zf@atsuitrue \ifnum \... l.7 \setmainfont{OpenBaskerville} –  Peterson Silva Nov 3 '11 at 2:07
If you are referring to the file name (and not the font name for installed fonts), you should add the extension, e.g. \setmainfont{OpenBaskerville.otf}. –  Caramdir Nov 3 '11 at 2:08
Also it seems that old versions of XeLaTeX/fontspec don't find fonts in the document directory (at least the version that comes shipped with Ubuntu doesn't seem to be able to do that). So you might want to upgrade to a current TeX distribution version. –  Caramdir Nov 3 '11 at 2:14