From 5c0a95b933cc0bcff531a4725f8170b2aec1726b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 28 Jul 2013 14:48:20 +0200 Subject: [tool] work around ms compiler limitations --- luaotfload-tool.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 92483d6..3846700 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -46,6 +46,7 @@ local iowrite = io.write local kpsefind_file = kpse.find_file local next = next local osdate = os.date +local ostype = os.type local stringexplode = string.explode local stringformat = string.format local stringlower = string.lower @@ -507,7 +508,14 @@ local display_general = function (fullinfo) val = #fullinfo[key] end elseif mode == "d" then - val = osdate("%F %T", fullinfo[key]) + if ostype == "unix" then + val = osdate("%F %T", fullinfo[key]) + else + --- the MS compiler doesn’t support C99, so + --- strftime is missing some functionality; + --- see loslib.c for details. + val = osdate("%Y-%m-d %H:%M:%S", fullinfo[key]) + end end if not val then val = "" @@ -795,7 +803,8 @@ 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, job.warnings) + texiowrite_nl "" end else logs.names_report(false, 0, -- cgit v1.2.3 From f84c7341ed8f83c0624be6be2ea796d4bbb97ae9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 31 Jul 2013 21:50:07 +0200 Subject: [db] make pfb scanning optional --- 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 3846700..1e88d4f 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -108,6 +108,7 @@ config.luaotfload.names_dir = config.luaotfload.names_dir or "names" config.luaotfload.cache_dir = config.luaotfload.cache_dir or "fonts" config.luaotfload.index_file = config.luaotfload.index_file or "luaotfload-names.lua" +config.luaotfload.include_t1 = config.luaotfload.include_t1 == true do -- we don’t have file.basename and the likes yet, so inline parser ftw local slash = P"/" @@ -1025,8 +1026,9 @@ local process_cmdline = function ( ) -- unit -> jobspec ["prefer-texmf"] = "p", quiet = "q", ["show-blacklist"] = "b", + type1 = 0, update = "u", - verbose = 1 , + verbose = 1, version = "V", warnings = "w", } @@ -1108,6 +1110,8 @@ local process_cmdline = function ( ) -- unit -> jobspec elseif v == "diagnose" then action_pending["diagnose"] = true result.asked_diagnostics = optarg[n] + elseif v == "type1" then + config.luaotfload.include_t1 = true end end -- cgit v1.2.3 From e8b9a15801b4d0cd52126d21d4ba262b472ba45c Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 31 Jul 2013 22:37:07 +0200 Subject: [db] remove --type1 option in favor of --formats, a configurable format set --- luaotfload-tool.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 1e88d4f..8cac103 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -108,7 +108,7 @@ config.luaotfload.names_dir = config.luaotfload.names_dir or "names" config.luaotfload.cache_dir = config.luaotfload.cache_dir or "fonts" config.luaotfload.index_file = config.luaotfload.index_file or "luaotfload-names.lua" -config.luaotfload.include_t1 = config.luaotfload.include_t1 == true +config.luaotfload.formats = config.luaotfload.formats or "otf,ttf,ttc,dfont" do -- we don’t have file.basename and the likes yet, so inline parser ftw local slash = P"/" @@ -1026,7 +1026,7 @@ local process_cmdline = function ( ) -- unit -> jobspec ["prefer-texmf"] = "p", quiet = "q", ["show-blacklist"] = "b", - type1 = 0, + formats = 1, update = "u", verbose = 1, version = "V", @@ -1110,8 +1110,8 @@ local process_cmdline = function ( ) -- unit -> jobspec elseif v == "diagnose" then action_pending["diagnose"] = true result.asked_diagnostics = optarg[n] - elseif v == "type1" then - config.luaotfload.include_t1 = true + elseif v == "formats" then + names.set_font_filter (optarg[n]) end end -- cgit v1.2.3 From 6b230e2f951822095d9ea5b9fc12c4307b8581ea Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 31 Jul 2013 22:59:17 +0200 Subject: [doc] document --format and add it to usage message --- luaotfload-tool.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 8cac103..b5c7976 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -211,6 +211,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 + --formats=[+|-]EXTENSIONS set, add, or subtract formats to index -p --prefer-texmf prefer fonts in the TEXMF over system fonts --find="font name" query the database for a font name @@ -267,6 +268,7 @@ The font database will be saved to short = [[ Usage: luaotfload-tool [--help] [--version] [--verbose=] [--update] [--force] [--prefer-texmf] + [--dry-run] [--formats=] [--find=] [--fuzzy] [--info] [--inspect] [--list=] [--fields=] [--cache=] [--flush-lookups] -- cgit v1.2.3 From 898fa8861c06b41acd946a1de35a13c64e26d22c Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 1 Aug 2013 16:27:45 +0200 Subject: [diagnose] add diagnostics for font index --- luaotfload-tool.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index b5c7976..3bec847 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -199,7 +199,8 @@ This tool is part of the luaotfload package. Valid options are: -V --version print version and exit -h --help print this message --diagnose=CHECK run a self test procedure; one of "files", - "permissions", or "repository" + "environment", "index", "permissions", or + "repository" --alias= force behavior of "luaotfload-tool" or legacy "mkluatexfontdb" -- cgit v1.2.3