summaryrefslogtreecommitdiff
path: root/luaotfload-tool.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-31 18:39:36 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-31 18:39:36 +0200
commit7663d687960b44e4f12f89f828752dc52688fc0b (patch)
treedc5c1990116080fe8aa602c0ab1b9de764c67a0e /luaotfload-tool.lua
parent92e4b9568de9f5dad3a17ea2c890d6ca2b0a0d7d (diff)
downloadluaotfload-7663d687960b44e4f12f89f828752dc52688fc0b.tar.gz
add option ``--show-blacklist`` to luaotfload-tool
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-xluaotfload-tool.lua17
1 files changed, 15 insertions, 2 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 25cc9fa..e3f5a93 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -183,6 +183,7 @@ This tool is part of the luaotfload package. Valid options are:
--list=<criterion> output list of entries by field <criterion>
--list=<criterion>:<value> restrict to entries with <criterion>=<value>
--fields=<f1>,<f2>,…,<fn> which fields <f> to print with --list
+ -b --show-blacklist show blacklisted files
The font database will be saved to
%s
@@ -269,7 +270,7 @@ set.
--]]--
local action_sequence = {
- "loglevel", "help", "version", "cache",
+ "loglevel", "help", "version", "blacklist", "cache",
"flush", "generate", "list", "query",
}
local action_pending = table.tohash(action_sequence, false)
@@ -297,6 +298,15 @@ actions.help = function (job)
return true, false
end
+actions.blacklist = function (job)
+ names.read_blacklist()
+ local n = 0
+ for n, entry in next, table.sortedkeys(fonts.names.blacklist) do
+ texiowrite_nl(stringformat("(%d %s)", n, entry))
+ end
+ return true, false
+end
+
actions.generate = function (job)
local fontnames, savedname
fontnames = names.update(fontnames, job.force_reload, job.dry_run)
@@ -565,12 +575,13 @@ local process_cmdline = function ( ) -- unit -> jobspec
log = 1,
["prefer-texmf"] = "p",
quiet = "q",
+ ["show-blacklist"] = "b",
update = "u",
verbose = 1 ,
version = "V",
}
- local short_options = "DfFilpquvVh"
+ local short_options = "bDfFilpquvVh"
local options, _, optarg =
alt_getopt.get_ordered_opts (arg, short_options, long_options)
@@ -633,6 +644,8 @@ local process_cmdline = function ( ) -- unit -> jobspec
result.dry_run = true
elseif v == "p" then
config.luaotfload.prioritize = "texmf"
+ elseif v == "b" then
+ action_pending["blacklist"] = true
end
end