I’m trying to switch from XeLaTeX to LuaLaTeX but unfortunately the latter doesn’t seem to find fonts that are organised with FontExplorer X, while XeTeX hasn’t any problems. The following example works fine with XeLaTeX but with LuaLaTeX I only get the font-not-found
error message:
% !TeX program = lualatex
% !-TeX program = xelatex
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Minion Pro}
\begin{document}
Test
\end{document}
When I change the font to Arial (which is in anther font folder, see below) LuaLaTeX works.
After reading $OSFONTDIR on OSX I tried to add the FontExplorer folder to $ODFONTDIR
but without success:
Tobis-Mac:~ Tobi$ export OSFONTDIR="/Users/Tobi/FontExplorer X/Font Library/":$OSFONTDIR
Tobis-Mac:~ Tobi$ echo $OSFONTDIR
/Users/Tobi/FontExplorer X/Font Library/:
Tobis-Mac:~ Tobi$ luaotfload-tool --update
Tobis-Mac:~ Tobi$ luaotfload-tool --find="Arial"
luaotfload | resolve : Font "Arial" found!
luaotfload | resolve : Resolved file name "/Library/Fonts/Arial.ttf"
Tobis-Mac:~ Tobi$ luaotfload-tool --find="Minion Pro"
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: "Font Minion Pro not found.".
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : Cannot find "Minion Pro" in index.
luaotfload | resolve : Hint: use the --fuzzy option to display suggestions.
Tobis-Mac:~ Tobi$
See edit history of this post for the version with escaped space instead of double quotes.
I know that XeTeX and LuaTeX handle font loading differently but how can I make LuaTeX work with fonts saved in /Users/Tobi/FontExplorer X/Font Library/
?
I’m working with MacTeX alias TeX Live 2016 (up to date) and FontExplorer X Pro 5.5.1 on macOS Sierra 10.12.4.
Tobis-Mac:~ Tobi$ xelatex -v
XeTeX 3.14159265-2.6-0.99996 (TeX Live 2016)
Tobis-Mac:~ Tobi$ lualatex -v
This is LuaTeX, Version 0.95.0 (TeX Live 2016)
Information of the fonts
"/Users/Tobi/FontExplorer X/Font Library/"
$OSFONTDIR
isn't searched recursively was an issue in the past, cf. tex.stackexchange.com/a/275072/29873$OSFONTDIR
to$HOME/FontExplorer X/Font Library//
(two slashes at the end) seems to work. At leastluaotfload-tool --find="Minion Pro"
finds the font now