Looking into #200 I looked over the configuration file loading if luaotfload which reminded me that it is kind of a mess: Currently the first of the following files is loaded:
./luaotfload.conf
./luaotfloadrc
$XDG_CONFIG_HOME/luaotfload.conf
$XDG_CONFIG_HOME/luaotfloadrc
$HOME/.luaotfloadrc
- Kpathsea lookup for
luaotfloadrc
- Kpathsea lookup for
luaotfload.conf
There are quite some issues I have with this:
- Why is sometimes
luaotfload.conf preferred and sometimes luaotfloadrc?
- Why do we need two names in the first place? Especially for the potentially costly kpathsea lookup this seems like a waste.
- Why should the user configuration file (e.g. in
$XDG_CONFIG_HOME/luaotfload.conf be skipped if ./luaotfload.conf is present?
One suggestion to improve this would be:
- Only use
luaotfload.conf, but additionally look for luaotfloadrc for now and throw an error if it exists to avoid silently breaking something.
- Load all found files in reverse order of preference. (So that local files can overwrite settings from more global files, but settings which are not overwritten still get applied.)
- Remove the
config.actions interfaces in the process or at least move them into less generic names.
Of course, this is potentially breaking existing configurations, but I would assume that these aren't used that much in the first place and even if people use these files, they can just rename them.
Looking into #200 I looked over the configuration file loading if luaotfload which reminded me that it is kind of a mess: Currently the first of the following files is loaded:
./luaotfload.conf./luaotfloadrc$XDG_CONFIG_HOME/luaotfload.conf$XDG_CONFIG_HOME/luaotfloadrc$HOME/.luaotfloadrcluaotfloadrcluaotfload.confThere are quite some issues I have with this:
luaotfload.confpreferred and sometimesluaotfloadrc?$XDG_CONFIG_HOME/luaotfload.confbe skipped if./luaotfload.confis present?One suggestion to improve this would be:
luaotfload.conf, but additionally look forluaotfloadrcfor now and throw an error if it exists to avoid silently breaking something.config.actionsinterfaces in the process or at least move them into less generic names.Of course, this is potentially breaking existing configurations, but I would assume that these aren't used that much in the first place and even if people use these files, they can just rename them.