luaotfload
luaotfload copied to clipboard
Feature Request: Override fonts.conf location with env var FONTCONFIG_FILE
Hi team,
I would like to override fontconfig configuration for each project by specifying environment variable FONTCONFIG_FILE.
Environment variables
FONTCONFIG_FILE is used to override the default configuration file.
Currently it's hardcoded as the following.
https://github.com/latex3/luaotfload/blob/72561365e3de47c138418af7d11ab335683ff7f0/src/luaotfload-database.lua#L2433-L2436
This makes it possible to compile LuaLaTeX documents reproducibily with Nix which generates fonts.conf at some arbitrary directory with makeFontsConf.
Thanks!
Wouldn't it be better to use a TeX-specific variable? TL configuration, for example, is basically done in texmf.cnf/texmfcnf.lua.
Not that my opinion is worth squat, but I don't think it would be a great idea to make the behaviour dependent on the value of an environmental variable which doesn't belong to the TeX installation. (Aside from PATH which is unavoidable.)