summaryrefslogtreecommitdiff
path: root/src/luaotfload-tool.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luaotfload-tool.lua')
-rwxr-xr-xsrc/luaotfload-tool.lua49
1 files changed, 7 insertions, 42 deletions
diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua
index 9b8ffc3..4b4dc50 100755
--- a/src/luaotfload-tool.lua
+++ b/src/luaotfload-tool.lua
@@ -267,8 +267,6 @@ Usage: %s [OPTIONS...]
-i --info display basic font metadata
-I --inspect display detailed font metadata
- -w --warnings display warnings generated by the
- fontloader library
--list=<criterion> output list of entries by field <criterion>
--list=<criterion>:<value> restrict to entries with <criterion>=<value>
@@ -455,29 +453,6 @@ local show_info_items = function (fontinfo)
texiowrite_nl ""
end
-local p_eol = S"\n\r"^1
-local p_space = S" \t\v"^0
-local p_line = p_space * C((1 - p_eol)^1)^-1
-local p_lines = Ct(p_line * (p_eol^1 * p_line^-1)^0)
-
-local show_fontloader_warnings = function (ws)
- local nws = #ws
- print_heading(stringformat(
- [[the fontloader emitted %d warnings]],
- nws), 2)
- texiowrite_nl ""
- for i=1, nws do
- local w = ws[i]
- texiowrite_nl (stringformat("%d:", i))
- local lines = lpegmatch(p_lines, w)
- for i=1, #lines do
- local line = lines[i]
- texiowrite_nl(" ยท " .. line)
- end
- texiowrite_nl ""
- end
-end
-
local p_spacechar = S" \n\r\t\v"
local p_wordchar = (1 - p_spacechar)
local p_whitespace = p_spacechar^1
@@ -657,11 +632,8 @@ local display_features = function (features)
end
end
-local show_full_info = function (path, subfont, warnings)
+local show_full_info = function (path, subfont)
local rawinfo, warn = fonts.handlers.otf.readers.loadfont (path, subfont)
- if warnings then
- show_fontloader_warnings(warn)
- end
if not rawinfo then
texiowrite_nl(stringformat([[cannot open font %s]], path))
return
@@ -694,7 +666,7 @@ The font info knows two levels of detail:
returned by readers.loadfont().
--doc]]--
-local show_font_info = function (basename, askedname, detail, warnings)
+local show_font_info = function (basename, askedname, detail)
local filenames = fonts.names.data().files
local index = filenames.base[basename]
local fullname = filenames.full[index]
@@ -720,7 +692,7 @@ local show_font_info = function (basename, askedname, detail, warnings)
if subfont then
show_info_items(subfont)
if detail == true then
- show_full_info(fullname, subfont, warnings)
+ show_full_info(fullname, subfont)
end
else -- list all subfonts
logreport (true, 1, "resolve",
@@ -730,14 +702,14 @@ local show_font_info = function (basename, askedname, detail, warnings)
[[Showing info for font no. %d]], n)
show_info_items(shortinfo[subfont])
if detail == true then
- show_full_info(fullname, subfont, warnings)
+ show_full_info(fullname, subfont)
end
end
end
else
show_info_items(shortinfo)
if detail == true then
- show_full_info(fullname, subfont, warnings)
+ show_full_info(fullname, subfont)
end
end
else
@@ -1212,7 +1184,7 @@ actions.query = function (job)
"Resolved file name %q", foundname)
end
if job.show_info then
- show_font_info (foundname, query, job.full_info, job.warnings)
+ show_font_info (foundname, query, job.full_info)
iowrite "\n"
end
else
@@ -1437,7 +1409,6 @@ local process_cmdline = function ( ) -- unit -> jobspec
local result = { -- jobspec
force_reload = nil,
full_info = false,
- warnings = false,
criterion = "",
query = "",
log_level = nil,
@@ -1478,10 +1449,9 @@ local process_cmdline = function ( ) -- unit -> jobspec
update = "u",
verbose = 1,
version = "V",
- warnings = "w",
}
- local short_options = "bcDfFiIlLnpqRSuvVhw"
+ local short_options = "bcDfFiIlLnpqRSuvVh"
local options, _, optarg =
alt_getopt.get_ordered_opts (arg, short_options, long_options)
@@ -1513,12 +1483,7 @@ local process_cmdline = function ( ) -- unit -> jobspec
if lvl then
lvl = tonumber(lvl)
result.log_level = lvl
- if lvl > 2 then
- result.warnings = true
- end
end
- elseif v == "w" then
- result.warnings = true
elseif v == "log" then
local str = optarg[n]
if str then