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.luaandCardowas missing; I then added the
Cardofolder font to this folder:/usr/local/texlive/2012/texmf-dist/fonts/I executed the
mkluatexfontdb -vvvcommand in a terminal;- I re-checked the
otfl-names.luaandCardowas 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 BookApp (located i theApplicationsfolder) 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. – Mico Mar 21 '13 at 22:16/texmf-dist/2012, because those fonts won't migrate automatically whenMacTeX2013comes along. Much better to copy them to~/Library/Fontsand letFontBookhandle the "installation" business. – Mico Mar 21 '13 at 22:21luaotfloadwill not find it. Installing fonts under distribution tree is wrong anyway, what are you seeing is just a side effect of that. – خالد حسني Mar 22 '13 at 11:00texmf-dist: usetexmf-local. – Martin Schröder Mar 22 '13 at 13:06otfl-names.luaand notttfl-names.lua???). Seems that opentype fonts perform better, until now, every single one of the tested otfs work... Unfortunately, myGaramond MT(which happens to be the one I prefer) comes only in ttf (and it doesn't work)... I'll now have to choose betweenBembo&Garamond Premier Pro. – Meclassic Mar 22 '13 at 15:00