From 13621b3de330fa9fa847e7f2963369105f663d74 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 16 Mar 2015 08:08:22 +0100 Subject: [conf] add option for switching fontloaders --- src/luaotfload-configuration.lua | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua index a375c37..b198697 100644 --- a/src/luaotfload-configuration.lua +++ b/src/luaotfload-configuration.lua @@ -5,7 +5,7 @@ -- REQUIREMENTS: Luaotfload 2.5 or above -- AUTHOR: Philipp Gesang (Phg), -- VERSION: same as Luaotfload --- MODIFIED: 2014-07-24 21:49:31+0200 +-- MODIFIED: 2015-03-16 07:48:58+0100 ------------------------------------------------------------------------------- -- @@ -130,6 +130,19 @@ local feature_presets = { }, } +--[[doc-- + + We allow loading of arbitrary fontloaders. Nevertheless we maintain a + list of the “official” ones shipped with Luaotfload so we can emit a + different log message. + +--doc]]-- + +local registered_loaders = { + default = "fontloader", + fontloader = "fontloader", + tl2013 = "tl2013", +} ------------------------------------------------------------------------------- @@ -441,6 +454,23 @@ local option_spec = { return "patch" end, }, + fontloader = { + in_t = string_t, + out_t = string_t, + transform = function (id) + local ldr = registered_loaders[id] + if ldr ~= nil then + logreport ("log", 2, "conf", + "Using predefined fontloader \"%s\".", ldr) + return ldr + end + logreport ("log", 0, "conf", + "Requested fontloader \"%s\" not defined, " + .. "use at your own risk.", + id) + return id + end, + }, log_level = { in_t = number_t, out_t = number_t, --- TODO int_t from 5.3.x on @@ -589,6 +619,7 @@ local formatters = { run = { color_callback = { false, format_string }, definer = { false, format_string }, + fontloader = { false, format_string }, log_level = { false, format_integer }, resolver = { false, format_string }, }, -- cgit v1.2.3