I have an .otf font in same dir with .tex files. I'm using XeLaTex to work with this font, consider following code

\documentclass[a4paper,12pt]{article}
\usepackage[xetex]{graphicx}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{csvtools}
\usepackage{graphicx}
...
\begin{document}
...
\begin{minipage}{84mm}
\fontspec {Collator.otf}
\sffamily
\centering
\fontsize{32}{32} \textbf{\strut \insertName}
\end{minipage}
...
\end{document}

yields error

On \fontspec {Collator.otf} line, but it should find this font in project directory.

Is there any other options or I'm doing something wrong?

• There are many things wrong with this document: you should not load inputenc or fontenc using XeLaTeX. You shouldn't pass the driver to graphicx; the csvtools package is obsolete and replaced by the datatool package. The typical way to use a font with XeLaTeX is to simply install it with your other system fonts and XeLaTeX will find it automatically. Is there a reason you need the font in the local directory? – Alan Munn Apr 2 '13 at 2:02
• @AlanMunn Yes, I want to use this font on other machines, where I have no administrative rights. – sigrlami Apr 2 '13 at 2:05

There are many problems with your document. See the following question for some basics about using XeLaTeX.

It is possible to use local fonts with XeLaTeX but you have to specify the path explicitly. See the following question for details.

Instead of using \fontspec directly, you should always define a new font family to load a font.

Here's a fixed version of your document.

% !TEX TS-program = XeLaTeX

\documentclass[a4paper,12pt]{article}

\usepackage{fontspec}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{fullpage}
\usepackage{csvtools}
% This is obsolete and has been replaced by datatool
\usepackage{graphicx}
\newfontfamily\collfont[Path=./]{Collator.otf}
\begin{document}
\begin{minipage}{84mm}
\collfont
\sffamily
\centering
\fontsize{32}{32} \textbf{\strut INSERT NAME}
\end{minipage}
\end{document}