I have problems trying to get new fonts to work when compiling with LuaLaTeX. I'm working on Mac and use TexShop (with the MacTeX
package).
It goes like this:
I downloaded for example the Cardo
font; I installed the Cardo
font (it now appears in the Font Book); I tried to compile a simple text that goes like this:
\documentclass[11pt]{book}
\usepackage[no-math]{fontspec}
\usepackage[frenchb]{babel}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmainfont{Cardo}
\begin{document}
Hello world!
\end{document}
After compiling I obtained the following error message:
luaotfload | Font names database loaded: /Users/juan/Library/texlive/2012/texmf
-var/luatex-cache/generic/names/otfl-names.lua
luaotfload | Updating the font names database:
luaotfload | Scanning TEXMF fonts...
luaotfload | Scanning OS fonts...
luaotfload | Font names database saved: %s
: /Users/juan/Library/texlive/2012/texmf-var/luatex-cache/generic/names/otfl-names.lua
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
./testBembo.tex:6: fontspec error: "font-not-found"
!
! The font "Cardo" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.6 \setmainfont{Cardo}
?
Process aborted
- then I checked the
otfl-names.lua
andCardo
was missing; I then added the
Cardo
folder font to this folder:/usr/local/texlive/2012/texmf-dist/fonts/
I executed the
mkluatexfontdb -vvv
command in a terminal;- I re-checked the
otfl-names.lua
andCardo
was finally there;
So I naturally tried to compile the text again after resetting the computer and (as you might guess by now) I obtained (again!) the following error message:
luaotfload | Font names database loaded: /Users/juan/Library/texlive/2012/texmf
-var/luatex-cache/generic/names/otfl-names.lua
luaotfload | Updating the font names database:
luaotfload | Scanning TEXMF fonts...
luaotfload | Scanning OS fonts...
luaotfload | Font names database saved: %s
: /Users/juan/Library/texlive/2012/texmf-var/luatex-cache/generic/names/otfl-na
mes.lua
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
./testBembo.tex:6: fontspec error: "font-not-found"
!
! The font "Cardo" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.6 \setmainfont{Cardo}
?
Process aborted
The thing is driving me crazy! I migrated to LuaLaTeX only because I was promised to be able to use almost any font with it. What am I doing wrong?
Font Book
App (located i theApplications
folder) and clicking on the "Install Font" button that's in the lower part of the window that FontBook opens. This method may become tedious if you're downloading dozens and dozens of fonts, but I find it to be completely failsafe./texmf-dist/2012
, because those fonts won't migrate automatically whenMacTeX2013
comes along. Much better to copy them to~/Library/Fonts
and letFontBook
handle the "installation" business.texmf-dist
: usetexmf-local
.