diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua index 92de4321551..8cdebe063d8 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua @@ -92,6 +92,14 @@ local valid_formats = tabletohash { "otf", "ttc", "ttf", "afm", "pfb" } +local default_anon_sequence = { + "tex", "path", "name" +} + +local valid_resolvers = tabletohash { + "tex", "path", "name", "file", "my" +} + local feature_presets = { arab = tabletohash { "ccmp", "locl", "isol", "fina", "fin2", @@ -198,6 +206,7 @@ local default_config = { use_fontforge = false, }, run = { + anon_sequence = default_anon_sequence, resolver = "cached", definer = "patch", log_level = 0, @@ -502,6 +511,45 @@ local option_spec = { use_fontforge = { in_t = boolean_t, }, }, run = { + anon_sequence = { + in_t = string_t, + out_t = table_t, + transform = function (s) + if s ~= "default" then + local bits = { lpegmatch (commasplitter, s) } + if next (bits) then + local seq = { } + local done = { } + for i = 1, #bits do + local bit = bits [i] + if valid_resolvers [bit] then + if not done [bit] then + done [bit] = true + seq [#seq + 1] = bit + else + logreport ("both", 0, "conf", + "ignoring duplicate resolver %s at position %d \z + in lookup sequence", + bit, i) + end + else + logreport ("both", 0, "conf", + "lookup sequence contains invalid item %s \z + at position %d.", + bit, i) + end + end + if next (seq) then + logreport ("both", 2, "conf", + "overriding anon lookup sequence %s.", + tableconcat (seq, ",")) + return seq + end + end + end + return default_anon_sequence + end + }, live = { in_t = boolean_t, }, --- false for the tool, true for TeX run resolver = { in_t = string_t, @@ -639,6 +687,15 @@ local format_keyval = function (var, val) end end +local format_list = function (var, val) + local elts = { } + for i = 1, #val do elts [i] = val [i] end + if next (elts) then + return stringformat (indent .. "%s = %s", + var, tableconcat (elts, ",")) + end +end + local format_section = function (title) return stringformat ("[%s]", dashed (title)) end @@ -693,6 +750,7 @@ local formatters = { lookups_file = { false, format_string }, }, run = { + anon_sequence = { false, format_list }, color_callback = { false, format_string }, definer = { false, format_string }, fontloader = { false, format_string }, |