Hello, Benjamin Slade <beo...@gmail.com> writes:
> I'm having trouble using LuaTeX on Guix. > > luaotfload doesn't seem to be able to find any fonts, whether system-wide or > local (when used with fontspec). I get messages like: > > luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font > "Cardo" not found. > luaotfload | resolve : sequence of 3 lookups yielded nothing > appropriate. > ! Package fontspec Error: The font "Cardo" cannot be found. > > I don't have this issue on other distros, or on Guix when using XeTeX instead > of LuaTeX. > > Is there some additional setup or configuration (or another package ?) > that I need on Guix to get LuaTeX/luatofload to work properly ? > (pathing issues of some sort ?) I compiled successfully the following document (test-font.tex): --8<---------------cut here---------------start------------->8--- \documentclass[11pt,a4paper]{amsart} \usepackage{unicode-math} \setmathfont{Asana Math} \setmainfont{Droid Serif} \begin{document} \[(D_e\Phi_{\gamma(s)})^{-1}(\gamma'(s))=\varphi'(s)(D_e\Phi_{\alpha(\varphi(s))})^{-1}(\alpha'(\varphi(s)))\] \end{document} --8<---------------cut here---------------end--------------->8--- using the following command: guix shell texlive-scheme-small texlive-collection-luatex texlive-droid texlive-asana-math texlive-unicode-math -- lualatex test-font.tex However, I don't think it takes into consideration the specified fonts. In the same environment, `luaotfload-tool --help' reports --8<---------------cut here---------------start------------->8--- The font database will be saved to {/gnu/store/f1hdawmb5401cldyl6f27lvc3hvxbw8l-profile/share/texmf-dist/luatex-cache/generic/names/luaotfload-names.lua.gz {/gnu/store/f1hdawmb5401cldyl6f27lvc3hvxbw8l-profile/share/texmf-dist/luatex-cache/generic/names/luaotfload-names.luc ------------------------------------------------------------------------------- FONT CACHE --cache=<directive> operate on font cache, where <directive> is "show", "purge", or "erase" The font cache will be written to {/gnu/store/f1hdawmb5401cldyl6f27lvc3hvxbw8l-profile/share/texmf-dist/luatex-cache/generic/fonts/ --8<---------------cut here---------------end--------------->8--- This doesn't seem good as the store is not writable. I read[¹] that "texmf.cnf" and "texmfcnf.lua" might be misconfigured. In particular, `kpsewhich -var-value=TEXMFCACHE' reports a store location. At the very least, I think TEXMFCACHE in "texmf.cnf" should be set to $TEXMFVAR instead of $TEXMFSYSVAR;$TEXMFVAR as it is the case currently. I'm not sure it will help, tho. Regards, [¹] <https://tex.stackexchange.com/questions/691039/luaotfload-no-writeable-cache-path-error/691047> -- Nicolas Goaziou