diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-02-14 22:43:37 +0100 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-02-14 22:43:37 +0100 |
commit | 5ea0298990512f196ce1fb54ae2e6becc7b725a6 (patch) | |
tree | c9bd222c5bf02d030921a458c30d30b5498382cc /src/luaotfload-tool.lua | |
parent | c026306b593d7308767f585028b17340fc6b6895 (diff) | |
parent | 54269ef7c476dc4952ea2e6c08b6e2bfa9f68ba5 (diff) | |
download | luaotfload-5ea0298990512f196ce1fb54ae2e6becc7b725a6.tar.gz |
Merge pull request #198 from phi-gamma/texlive2014
fix Makefile, add support for scanning local font files
Diffstat (limited to 'src/luaotfload-tool.lua')
-rwxr-xr-x | src/luaotfload-tool.lua | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua index 35765b5..9f00956 100755 --- a/src/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua @@ -723,9 +723,9 @@ set. --]]-- local action_sequence = { - "loglevel", "help", "version", "diagnose", - "blacklist", "cache", "flush", "generate", - "list", "query", + "loglevel", "help", "version", "diagnose", + "blacklist", "cache", "flush", "generate", + "scan_local", "list", "query", } local action_pending = tabletohash(action_sequence, false) @@ -762,8 +762,7 @@ actions.blacklist = function (job) end actions.generate = function (job) - local fontnames, savedname - fontnames = names.update(fontnames, job.force_reload, job.dry_run) + local fontnames = names.update(fontnames, job.force_reload, job.dry_run) report ("info", 2, "db", "Fonts in the database: %i", #fontnames.mappings) if names.data() then return true, true @@ -771,8 +770,13 @@ actions.generate = function (job) return false, false end +actions.scan_local = function (job) + names.scan_local_fonts () + return true, true +end + actions.flush = function (job) - local success, lookups = names.flush_lookup_cache() + local success = names.flush_lookup_cache() if success then local success = names.save_lookups() if success then @@ -1094,6 +1098,7 @@ local process_cmdline = function ( ) -- unit -> jobspec inspect = "I", limit = 1, list = 1, + ["local"] = "L", log = 1, ["max-fonts"] = 1, ["no-reload"] = "n", @@ -1109,7 +1114,7 @@ local process_cmdline = function ( ) -- unit -> jobspec warnings = "w", } - local short_options = "bcDfFiIlnpqRSuvVhw" + local short_options = "bcDfFiIlLnpqRSuvVhw" local options, _, optarg = alt_getopt.get_ordered_opts (arg, short_options, long_options) @@ -1167,6 +1172,9 @@ local process_cmdline = function ( ) -- unit -> jobspec result.full_info = true elseif v == "l" then action_pending["flush"] = true + elseif v == "L" then + action_pending["generate"] = true + action_pending["scan_local"] = true elseif v == "list" then action_pending["list"] = true result.criterion = optarg[n] |