[Tex/LaTex] Font not found by XeLaTeX

fontsxetex

Hi LaTeX gurus out there.

I understand that you could use XeLaTeX to use any system font. Well, recently I downloaded a LaTeX template for a CV from http://www.latextemplates.com
The template uses the Fontin font found here: http://www.exljbris.com/fontin.html

Yet, when I try to compile the document using XeLaTeX, and something goes wrong as I get the following error and no pdf file is produced:

.................................................
. fontspec info: "no-scripts"
. 
. Font Fontin does not contain any OpenType `Script' information.
.................................................
\g_fontspec_family_Fontin_int=\count167
.................................................
. fontspec info: "no-font-shape"
. 
. Could not resolve font Fontin/B (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "no-font-shape"
. 
. Could not resolve font Fontin/I (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "no-font-shape"
. 
. Could not resolve font Fontin/BI (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "defining-font"
. 
. Font family 'Fontin(0)' created for font 'Fontin' with options
. [Mapping=tex-text,SmallCapsFont = Fontin SmallCaps].
. 
. This font family consists of the following shapes:
. 
. * 'normal' with NFSS spec.:
. <->"Fontin/AAT:mapping=tex-text;"
. 
. * 'small caps' with NFSS spec.:
. <->"Fontin SmallCaps/AAT:mapping=tex-text;"
.................................................

so I have no idea what the problem is. I installed the fonts, as I can see them on /Library/Fonts/ and I can use them in text editors.

This is a small working example:

\documentclass[a4paper,10pt]{article} % Default font size and paper size

\usepackage{fontspec} % For loading fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font

\usepackage{xunicode,xltxtra,url,parskip} % Formatting packages

\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors

\usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}
% To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}

\usepackage{hyperref} % Required for adding links   and customizing them
\definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document

\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections
\titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections

\begin{document}


testing Fontin fonts.
\end{document}

Can someone tell me what's wrong here?

Best Answer

It may be the case that the version of the Fontin font family you downloaded from http://www.exljbris.com/fontin.html isn't fully compatible with XeLaTeX's (and LuaLaTeX's) font loading mechanisms. On that website, there's an option to download an OpenType version of these fonts. By the way, the header for the Opentype option says that it's for PCs; you can ignore that restriction: these fonts should work on a MacOSX system just as well.

At any rate, after downloading and installing the Opentype version of the Fontin files, I don't experience the problems you're describing. You may want to give the .otf files a try.

Related Question