2

I am using Mac, and following a template .tex file. I have tried to run xelatex myFile.tex, but I receive the error:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
! 
! The font "Adobe Garamond Pro" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.35 \setmainfont{Adobe Garamond Pro}

I followed the suggestions by Frank Pastor in this previous post (MacOSX: Cannot use garamond font). I also followed advice to download the Fontin package at (http://www.exljbris.com/fontin.html). However, I persist to getting the same error.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Plasmati Graduate CV
% LaTeX Template
% Version 1.0 (24/3/13)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Alessandro Plasmati (alessandro.plasmati@gmail.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Important note:
% This template needs to be compiled with XeLaTeX.
% The main document font is called Fontin and can be downloaded for free
% from here: http://www.exljbris.com/fontin.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[a4paper,10pt]{article} % Default font size and paper size
\usepackage{etoolbox}
\patchcmd{\thebibliography}{\section*{\refname}}{}{}{}
\usepackage{fontspec} % For loading fonts
\defaultfontfeatures{
    Path = /usr/local/texlive/2015/texmf-dist/fonts/opentype/public/fontawesome/ }
\usepackage{fontawesome}

\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Adobe Garamond Pro} % Main document font
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font
\usepackage{fancyhdr}
\usepackage{lastpage}
\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
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lfoot{My Name}
\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\cfoot{}
\lhead{}
\rhead{}
\chead{}
\begin{document}

Any advice would be helpful for me! I have been troubleshooting for about 2 hours, and while I find similar questions, I am unable to replicate answers and see results.

  • 1
    I can compile your document if I delete the lines \defaultfontfeatures{ Path = /usr/local/texlive/2015/texmf-dist/fonts/opentype/public/fontawesome/ }. Normally, fontspec knows where to find fontawesome. – Bernard Feb 10 '16 at 21:31
  • 2
    Added: Is Adobe Garamond Pro installed on your system? – Bernard Feb 10 '16 at 21:37
  • 6
    Adobe Garamond Pro is sold by Adobe; if you didn't buy it and didn't install it on your system, you can't use it. – egreg Feb 10 '16 at 22:08
  • @Bernard Thank you for letting me know it compiled on your system. I am sorry for the Path; I think I had to add that in there because fontspec on my system could not find fontawesome. Anyway, I believe I installed Adobe Garamond Pro (one source pointed to this as the downloading site: http://www.exljbris.com/fontin.html), another pointed to ugm.zip on this website (http://www.ctan.org/tex-archive/fonts/urw/garamond/). I followed installation instructions in both cases, and my document still will not compile. Thanks again. – user12211991 Feb 10 '16 at 22:32
  • In terms of whether it is installed or not, I believe so. I did follow the instructions mentioned by Frank Pastor at http://tex.stackexchange.com/questions/127858/macosx-cannot-use-garamond-font, so I do have the appropriate files in the directory /usr/local/texlive/texmf-local. – user12211991 Feb 10 '16 at 22:43
  • And to be honest, I have tried several different approaches (they all look so different though) and I get a bit confused about whether or not it ever really installed... sorry. – user12211991 Feb 10 '16 at 22:43
  • 2
    as you are using a Mac, have you used the FontBook application (which may have another name in your language) to check or install Adobe Garamond Pro ? You shouldn't a priori have the need to put anything in texmf-local in order to use such a font with xelatex. To the contrary, even. The simplest is for this font to be installed via FontBook, for example you should be able to use it in Apple's TextEdit or any other app with a font menu. Thus, checking if the font is intalled or not should be trivial. –  Feb 13 '16 at 07:43
  • 1
    Beware that many instructions on the net on how to use fonts with xelatex do not apply to Mac OS. The fontconfig things are all irrelevant. Maybe you fell into that trap ? –  Feb 13 '16 at 07:44
  • 2
    You need to confirm that Adobe Garamond Pro is on your system. It really doesn't sound like it. Can you see it in the Mac's Font Book, as jfbu asked? (On my Mac, that's under Launcher->Other->Font Book.) Or can you use the font in a Mac application like Pages or Keynote? XeLatex can't find what isn't there. And as egred said, if you didn't buy (spend money) and install the font, you don't have it: this one's commercial. In that case, use the ebgaramond font recommended below, it's really quite nice. – dedded Feb 13 '16 at 14:08

2 Answers2

3

First the obvious: if you really want your source to work with \setmainfont{Adobe Garamond Pro} you need Adobe Garamond Pro ...

Further you are with xelatex on Mac OS, which is not the same as xelatex on other systems. The simplest with xelatex on Mac OS is to have the font installed on your Mac in the Mac way. This can be done via FontBook application and suitable menu items. The font can either be installed globally in /Library/Fonts or locally in /Users/<username>/Library/Fonts.

The instructions your are linking to at MacOSX: Cannot use garamond font are for installation in a TeXLive tree of fonts with 256 slots: look at \usepackage[T1]{fontenc} in the question there. These fonts come with various support files for LaTeX NFSS font handling. This is not at all the same as using a font like Adobe Garamond Pro which I presume is an OpenType font, with xelatex engine.

You can also install such an OpenType font in texmf-local but then for xelatex on Mac OS X you need to use fontspec commands with font filenames (with .otf/.ttf extension,) and you need also to tell fontspec about Bold=.., Italic=..., BoldItalic=... as per fontspec documentation. It is really best to avoid that. Just get the OpenType font installed on your Mac for use by all Mac text handling applications and xelatex+fontspec will know how to use it out of the box.

2

This is a second-best solution if you don't have a licensed copy of Adobe Garamond Pro or want to avoid the hassle of a complicated installation: install the ebgaramond package and say \usespackage{ebgaramond}. This package installs an open-source cut of Garamond by Georg Duffner that I find extremely well done. Furthermore, using it is also simple as the package provides good defaults. I am using it with pdflatex like this:

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{ebgaramond}

The \usepackage{ebgaramond} takes some options that are worth knowing and which are detailed in the package documentation.