# Adobe Garamond Pro not working with XeLaTeX

Adobe Garamond Pro and XeLaTeX Guys, I am trying to use opentype fonts using XeLaTeX. Now when, I am trying to use Adobe Garamond Pro. It says

! Font \zf@basefont=Garamond at 10.0pt not loadable: Metric (TFM) file or installed font not found.

My operating system is Fedora 12. The /usr/share/fonts contain both folder name linux-libertine and Garamond in which it contains the .otf files. When of use Linux Libertine it is fine with Latex but Adobe Garamond Pro shows error. See the code below:

For Linux Libertine

\documentclass[10pt]{book}
\usepackage{xltxtra}
\setmainfont{Linux Libertine} % could be any Unicode font
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}


Output:

Now using Garamond - Code

\documentclass[10pt]{book}
\usepackage{xltxtra}
\setmainfont{Garamond} % could be any Unicode font
%\setmainfont{Adobe Garamond Pro} % could be any Unicode font
%\setmainfont{AGaramond Pro} % could be any Unicode font
%I have used all possible combination.
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}


Output is a BLANK File

The log says something like this:
(/usr/share/texmf/tex/latex/base/fixltx2e.sty))
! Font \zf@basefont=Garamond at 10.0pt not loadable: Metric (TFM) file or insta
\zf@fontspec ...ntname \zf@suffix " at \f@size pt
\unless \ifzf@icu \zf@set@...
l.3 \setmainfont{Garamond}
% could be any Unicode font
?


As you can see, I have tried every possible way to name the font.

So what should I do to fix this serious issues?

P.S. Both fonts are installed in my computer. Verification:

ls -R /usr/share/fonts/linux-libertine/ /usr/share/fonts/linux-libertine/: LinBiolinumB.ttf  LinLibertineBI.ttf  LinLibertineC.ttf  LinLibertine.ttf LinBiolinum.ttf   LinLibertineB.ttf   LinLibertineI.ttf

ls -R /usr/share/fonts/Garamond/
/usr/share/fonts/Garamond/:
AGaramondPro-BoldItalic.otf  AGaramondPro-Regular.otf
AGaramondPro-Bold.otf        AGaramondPro-SemiboldItalic.otf
AGaramondPro-Italic.otf      AGaramondPro-Semibold.otf

-
Out of curiosity, how did you get those fonts? I have Fedora 18 and the files aren't there, there isn't any package to install that. –  alfC Mar 28 '13 at 3:28

For me your sample works just fine, with the line:

\setmainfont{Adobe Garamond Pro}

uncommented (and the previous one commented out).

I suspect the font isn't cached. Try running [sudo] fc-cache -fv

-
Thanks guys it worked Now ;D –  Ujjwol Sep 6 '10 at 14:49

Use fc-query <font-name> and examine the family and perhaps also the fullname field to make certain you've tried the correct name to use.

If that doesn't work, use something like fc-list | grep -i gara to make sure the system knows about the font. If it doesn't, run fc-cache -v and try again.

If that doesn't work, then I don't have any other ideas.

-
It worked man! with \setmainfont{Adobe Garamond Pro} after i did fc-cache -fv as frabjous said. –  Ujjwol Sep 6 '10 at 14:49
BTW:I didn't get the command fc-query <font-name>. –  Ujjwol Sep 6 '10 at 14:50
I think fc-query is recent addition to fontconfig and might not be available in all distros. TeXLive ships with otfinfo (part of LCDF tools), which provides similar functionality. –  Khaled Hosny Sep 6 '10 at 17:39

As a note for other who might bump into this problem: try using a minimal document without additional packages if a given font doesn't seem to work. For instance the ngerman package can interfere with font loading and produce the messsage shown above.

-

A tip for those running into this problem on OS X is the following. It is possible that your OS X font cache is corrupted somehow. To reset this, execute the following:

• sudo atsutil databases -remove
• atsutil server -shutdown
• atsutil server -ping

The first removes all user font caches, the second shuts down the font server, and the third starts it up again (may take a moment).

-