luaotfload icon indicating copy to clipboard operation
luaotfload copied to clipboard

Feature Request: Override fonts.conf location with env var FONTCONFIG_FILE

Open na4zagin3 opened this issue 11 months ago • 1 comments

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!

na4zagin3 avatar Jan 01 '25 11:01 na4zagin3

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.)

cfr42 avatar Jan 21 '25 02:01 cfr42