From c7d9945cbece75331c9342ce0a8eaa9c37a0a06b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 27 May 2013 22:15:06 +0200 Subject: add option prefer-texmf to luaotfload-tool --- luaotfload-tool.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 721e3cf..9479180 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -172,6 +172,7 @@ This tool is part of the luaotfload package. Valid options are: -f --force force re-indexing all fonts -l --flush-lookups empty lookup cache of font requests -D --dry-run skip loading of fonts, just scan + -p --prefer-texmf prefer fonts in the TEXMF over system fonts --find="font name" query the database for a font name -F --fuzzy look for approximate matches if --find fails @@ -562,13 +563,14 @@ local process_cmdline = function ( ) -- unit -> jobspec limit = 1, list = 1, log = 1, + ["prefer-texmf"] = "p", quiet = "q", update = "u", verbose = 1 , version = "V", } - local short_options = "DfFilquvVh" + local short_options = "DfFilpquvVh" local options, _, optarg = alt_getopt.get_ordered_opts (arg, short_options, long_options) @@ -629,6 +631,8 @@ local process_cmdline = function ( ) -- unit -> jobspec result.cache = optarg[n] elseif v == "D" then result.dry_run = true + elseif v == "p" then + config.luaotfload.prioritize = "texmf" end end -- cgit v1.2.3 From acb76cca1c0bdedc811d7eeed1b2392b692cdf50 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 28 May 2013 22:26:14 +0200 Subject: have file locator return the filename when known fonts are specified without extension --- luaotfload-tool.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 9479180..a379633 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -546,7 +546,7 @@ local process_cmdline = function ( ) -- unit -> jobspec force_reload = nil, criterion = "", query = "", - log_level = 1, --- 2 is approx. the old behavior + log_level = 0, --- 2 is approx. the old behavior } local long_options = { -- cgit v1.2.3 From 54c49bfbc560fccaaf0330221e7af6d9153122cb Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 30 May 2013 02:33:21 +0200 Subject: collect second-tier candidates when matching fontnames --- luaotfload-tool.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index a379633..25cc9fa 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -354,24 +354,24 @@ actions.query = function (job) fonts.names.resolve(nil, nil, tmpspec) if success then - logs.names_report(false, 1, + logs.names_report(false, 0, "resolve", "Font “%s” found!", query) if subfont then - logs.names_report(false, 1, "resolve", + logs.names_report(false, 0, "resolve", "Resolved file name “%s”, subfont nr. “%s”", foundname, subfont) else - logs.names_report(false, 1, + logs.names_report(false, 0, "resolve", "Resolved file name “%s”", foundname) end if job.show_info then show_font_info(foundname) end else - logs.names_report(false, 1, + logs.names_report(false, 0, "resolve", "Cannot find “%s”.", query) if job.fuzzy == true then - logs.names_report(false, 1, + logs.names_report(false, 0, "resolve", "Looking for close matches, this may take a while ...") local success = fonts.names.find_closest(query, job.fuzzy_limit) end -- cgit v1.2.3 From 7663d687960b44e4f12f89f828752dc52688fc0b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 31 May 2013 18:39:36 +0200 Subject: add option ``--show-blacklist`` to luaotfload-tool --- luaotfload-tool.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'luaotfload-tool.lua') 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= output list of entries by field --list=: restrict to entries with = --fields=,,…, which fields 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 -- cgit v1.2.3