[Tex/LaTex] XeTeX font problem (font-not-found) on Mac OS X 10.8

fontsfontspecxetex

I installed Gotham font by copying otf files to /Library/Fonts/Gotham. Although Font Book cannot show the installed Gotham font properly (characters are borken), but Font Validation was fine, and it was usable in MS Word. However, if I try to use it with XeTeX as below

\documentclass{article}
\usepackage{xltxtra}
\usepackage{fontspec}
\setmainfont[ExternalLocation,Ligatures=TeX]{Gotham-Book}
\begin{document}
All human beings are born free and equal in dignity and rights.
\end{document}

I got "font-not-found" saying

Latex Error: ./xetex_test.tex:4 Font EU1/Gotham-Book(0)/m/n/10=[Gotham-Book]/ICU:mapping=tex-text; at 10.0pt not loadable: Metric (TFM) file or installed font not found.

But if I check it with fc-list, I got

$ fc-list | grep "Gotham"
/Library/Fonts/Gotham/Gotham-MediumItalic.otf: Gotham,Gotham Medium:style=Medium Italic,Italic
/Library/Fonts/Gotham/Gotham-BookItalic.otf: Gotham,Gotham Book:style=Book Italic,Italic
/Library/Fonts/Gotham/Gotham-Light.otf: Gotham,Gotham Light:style=Light,Regular
/Library/Fonts/Gotham/Gotham-Bold.otf: Gotham,Gotham Bold:style=Bold,Regular
/Library/Fonts/Gotham/Gotham-Book.otf: Gotham,Gotham Book:style=Book,Regular
/Library/Fonts/Gotham/Gotham-Medium.otf: Gotham,Gotham Medium:style=Medium,Regular
/Library/Fonts/Gotham/Gotham-LightItalic.otf: Gotham,Gotham Light:style=Light Italic,Italic
/Library/Fonts/Gotham/Gotham-BoldItalic.otf: Gotham,Gotham Bold:style=Bold Italic,Italic

, so it seems Gotham fonts are usable. I'm not sure why I got the font problem since the same installation process worked fine on Mac OS X 10.6. I'd appreciate any advice to resolve the problem.


update1:

I got the following error message when I run "xelatex"

) (/opt/local/share/texmf-texlive-dist/tex/latex/metalogo/metalogo.sty))kpathsea: Invalid fontname `[Gotham-Book]/ICU', contains '['

I guess the problem has something to do with having the extra brackets in the fontname (no idea how the brackets are inserted to the fontname). Should I take a look at fonts.conf?


update2:

I tried without "ExternalLocation" and it worked fine. Thank you all for the help!

Best Answer

ExternalLocation is used to load fonts by file name without the need to install them system-wide, but since that is not the case here you shouldn’t use it. You need to use the font name as is shown in FontBook, and that is most likely is just Gotham.

FontConfig is not used by XeTeX on Mac, so the output of fc-list or other fc-* tools has no relation to whether XeTeX will find the font or not.

Related Question