diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-04-28 21:22:58 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-04-28 21:23:01 +0200 |
commit | 619d652ec4e23339ed0db2c68dafcbfbcdf90b08 (patch) | |
tree | 44c70f77021804bf018d4a426cfa52e9c8d3442c /src/luaotfload-resolvers.lua | |
parent | 23ff1b009f3b4df6754848196d7556c11c323d83 (diff) | |
download | luaotfload-619d652ec4e23339ed0db2c68dafcbfbcdf90b08.tar.gz |
[conf,resolvers] add config option to tweak anon lookup sequence
Implements #263
The resolvers have already been decoupled a while ago but the goal of
allowing the sequence to be reordered at will was still outstanding.
Add a config option “anon-sequence” that is parsed as a comma-delimited
list of sequence components.
Diffstat (limited to 'src/luaotfload-resolvers.lua')
-rw-r--r-- | src/luaotfload-resolvers.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/luaotfload-resolvers.lua b/src/luaotfload-resolvers.lua index ee3b597..f911101 100644 --- a/src/luaotfload-resolvers.lua +++ b/src/luaotfload-resolvers.lua @@ -29,6 +29,7 @@ if not luaotfload then error "this module requires Luaotfload" end --doc]]-- local next = next +local tableconcat = table.concat local kpsefind_file = kpse.find_file local lfsisfile = lfs.isfile local stringlower = string.lower @@ -226,7 +227,14 @@ local default_anon_sequence = { local resolve_anon resolve_anon = function (specification) - return resolve_sequence (default_anon_sequence, specification) + local seq = default_anon_sequence + if config and config.luaotfload then + local anonseq = config.luaotfload.run.anon_sequence + if anonseq and next (anonseq) then + seq = anonseq + end + end + return resolve_sequence (seq, specification) end --[[doc-- |