In a terminal, do:
luaotfload-tool -ufvvvand let it run until it hangs. Use CTRL+C to abort, then do:
echo "iosevka.ttc" >> "$(kpsewhich -expand-var '${TEXMFHOME}/tex/luatex/luaotfload/luaotfload-blacklist.cnf')"Replace iosevka.ttc with the filename of the problematic font. Then try the first command again.
- In my experience, the culprit is likely a large TrueType Collection (TTC), such as the popular Iosevka typeface.
- Using
kpsewhichto expand theTEXMFHOMEpath is safer than relying on shell expansion or default paths. - As far as I know, it shouldn't be necessary to run
mktexlsrafter the commands above, even with TeX Live.
Per the luaotfload package documentation:
Some fonts are problematic in general, or just in LuaTeX. If you find that compiling your document takes far too long or eats away all your system’s memory, you can track down the culprit by running
luaotfload-tool -vto increase verbosity. Take a note of the filename of the font that database creation fails with and append it to the fileluaotfload-blacklist.cnf.A blacklist file is a list of font filenames, one per line. Specifying the full path to where the file is located is optional, the plain filename should suffice. File extensions (
.otf,.ttf, etc.) may be omitted. Anything after a percent (%) character until the end of the line is ignored, so use this to add comments. Place this file to some location where thekpselibrary can find it, e.g.texmf-local/tex/luatex/luaotfloadif you are running TeX Live1 or just leave it in the working directory of your document.luaotfloadreads all files namedluaotfload-blacklist.cnfit finds, so the fonts in./luaotfload-blacklist.cnfextend the global blacklist.Furthermore, a filename prepended with a dash character (
-) is removed from the blacklist, causing it to be temporarily whitelisted without modifying the global file. An example with explicit paths:/Library/Fonts/GillSans.ttc -/Library/Fonts/Optima.ttc
Footnotes
-
You may have to run
mktexlsrif you created a new file in your texmf tree. ↩