From 619d652ec4e23339ed0db2c68dafcbfbcdf90b08 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 28 Apr 2016 21:22:58 +0200 Subject: [conf,resolvers] add config option to tweak anon lookup sequence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/luaotfload-resolvers.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/luaotfload-resolvers.lua') 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-- -- cgit v1.2.3