3

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!

Mico
  • 506,678
  • I do not run Mac OSX, but before writing Manual font installation I was told, that it is there sudo fc-cache. – Speravir Apr 01 '13 at 03:01
  • Yes I didn't forget putting "sudo" in front of "fc-cache." – user28255 Apr 01 '13 at 03:02
  • 3
    FontConfig is not used by XeTeX on Mac, so fc-cache and other fc-* tools have no relation. You need to use the font name as you see in FontBook, and without ExternalLocation as it should not be used with system installed fonts. – خالد حسني Apr 01 '13 at 03:18
  • I don't know enough to understand the problem well, but I have an obvious question: If you install the font through the Font Book GUI, rather than by copying it, does that fix the problem? It sounds like there's some other config file that isn't getting updated, but that's needed. (Or is it that you are just trying to understand more about how font management works?) – Mars Apr 01 '13 at 03:32
  • My bet goes to \setmainfont[Ligatures=TeX]{Gotham Book} – egreg Apr 01 '13 at 09:24
  • @KhaledHosny Could you make your comment an answer? – Joseph Wright Aug 11 '13 at 12:38