# How can I use the Optima font delivered with my Mac in LuaLaTeX?

I am trying the following on my Mac:

\documentclass{minimal}

\usepackage{fontspec}

\begin{document}

\setsansfont{Optima}

\textsf{Test}
\end{document}


But I get the following:

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


I was under the impression this would work. What have I missed?

-
It seems that .ttc fonts are not found by the mkluatexfontdb script. The font is usable with xetex. –  egreg Sep 28 '11 at 15:40
Future versions of luaotfload (> version 1.25) will work out of the box. –  topskip Oct 4 '11 at 13:48

There is a file called otfl-blacklist.cnf in the directory /usr/local/texlive/2011/texmf-dist/tex/luatex/luaotfload.

One line of it is

/Library/Fonts/Optima.ttc


mkluatexfontdb block most TTC fonts by default because they broken in previous version of LuaTeX. But with MacTeX 2011, they are usable.

There are several solutions to this

1. Try to edit the file mentioned above, so it will not block optima. (But this is not recommended, what if someday luaotfload was updated? Edit it again?)
2. Copy the optima fonts to a new directory such that muluatexfontdb will be able to find it, for example, ~/Library/Fonts or one of fonts directory in texmf tree.

As long as you get the idea why fontspec cannot find it, as I explained above, you will certainly work around it. Good luck.

-
So are you saying that this is a problem that luaotfload has fixed, but the blacklist remains, and should be removed? Or is it just that some .ttc fonts work and some don't? –  Alan Munn Sep 28 '11 at 22:00
@AlanMunn I believe that it was actually a problem of luatex instead of luaotfload. At least all TTC fonts distributed with Mac OS X Lion, including /System/Library/Fonts and /Library/Fonts works for me with MacTeX 2011, namely LuaTeX 0.7 beta. Though the LastResort.ttf still takes forever to load. However I don't think luaotfload should change the blacklist as there may still be people using MacTeX 2010 for various reasons. –  Yan Zhou Sep 28 '11 at 22:13
I can confirm that this works also with MacTeX 2011 on OS X 10.6 (Snow Leopard) as well. So commenting out individual fonts as needed will indeed solve the problem. I tried to do this with a local copy of the blacklist, but it didn't work. Any ideas on why? –  Alan Munn Sep 29 '11 at 2:23
@AlanMunn the global black list is always read I guess. –  Yan Zhou Sep 29 '11 at 8:43
@AlanMunn Yan Zhou is correct about the global black list. Every black list it can find is read. –  topskip Sep 29 '11 at 19:33