summaryrefslogtreecommitdiff
path: root/scripts/context/lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-04-02 20:46:19 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-04-02 20:46:19 +0200
commite32f57c9c5968f0c09130f6e24e28a96d6e1393d (patch)
tree476d22407b719a74b18a849d83fb8464f9a042c4 /scripts/context/lua
parent30ea6ac75b1cf62ea8e17228c07d54824285acfa (diff)
downloadcontext-e32f57c9c5968f0c09130f6e24e28a96d6e1393d.tar.gz
2017-04-02 19:57:00
Diffstat (limited to 'scripts/context/lua')
-rw-r--r--scripts/context/lua/mtx-fonts.lua30
-rw-r--r--scripts/context/lua/mtxrun.lua6
2 files changed, 18 insertions, 18 deletions
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index aedaf1dbf..047383466 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -13,6 +13,8 @@ local givenfiles = environment.files
local suffix, addsuffix, removesuffix, replacesuffix = file.suffix, file.addsuffix, file.removesuffix, file.replacesuffix
local nameonly, basename, joinpath, collapsepath = file.nameonly, file.basename, file.join, file.collapsepath
local lower = string.lower
+local concat = table.concat
+local write_nl = texio.write_nl
local otfversion = 2.826
local otlversion = 3.028
@@ -228,14 +230,6 @@ function scripts.fonts.reload()
end
end
-local function subfont(sf)
- if sf then
- return string.format("index: % 2s", sf)
- else
- return ""
- end
-end
-
local function fontweight(fw)
if fw then
return string.format("conflict: %s", fw)
@@ -262,7 +256,7 @@ local function showfeatures(tag,specification)
indeed("style : %s",specification.style or "<nostyle>")
indeed("width : %s",specification.width or "<nowidth>")
indeed("variant : %s",specification.variant or "<novariant>")
- indeed("subfont : %s",subfont(specification.subfont))
+ indeed("subfont : %s",specification.subfont or "")
indeed("fweight : %s",fontweight(specification.fontweight))
-- maybe more
local instancenames = specification.instancenames
@@ -290,7 +284,7 @@ local function showfeatures(tag,specification)
else
done = true
end
- report("% -8s % -8s % -8s",f,s,table.concat(table.sortedkeys(ss), " ")) -- todo: padd 4
+ report("% -8s % -8s % -8s",f,s,concat(table.sortedkeys(ss), " ")) -- todo: padd 4
end
end
end
@@ -330,13 +324,15 @@ local function list_specifications(t,info)
entry.variant or "<novariant>",
entry.fontname,
entry.filename,
- subfont(entry.subfont),
+ entry.subfont or "",
fontweight(entry.fontweight),
}
end
+ table.insert(s,1,{"familyname","weight","style","width","variant","fontname","filename","subfont","fontweight"})
+ table.insert(s,2,{"","","","","","","","",""})
utilities.formatters.formatcolumns(s)
for k=1,#s do
- texio.write_nl(s[k])
+ write_nl(s[k])
end
end
end
@@ -344,7 +340,7 @@ end
local function list_matches(t,info)
if t then
- local s, w = table.sortedkeys(t), { 0, 0, 0 }
+ local s, w = table.sortedkeys(t), { 0, 0, 0, 0 }
if info then
for k=1,#s do
local v = s[k]
@@ -356,14 +352,18 @@ local function list_matches(t,info)
local entry = t[v]
s[k] = {
v,
+ entry.familyname,
entry.fontname,
entry.filename,
- subfont(entry.subfont)
+ entry.subfont or "",
+ concat(entry.instancenames or { }, " "),
}
end
+ table.insert(s,1,{"identifier","familyname","fontname","filename","subfont","instances"})
+ table.insert(s,2,{"","","","","","",""})
utilities.formatters.formatcolumns(s)
for k=1,#s do
- texio.write_nl(s[k])
+ write_nl(s[k])
end
end
end
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index aea212133..5e08f19ac 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -5666,7 +5666,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 36394, stripped down to: 20179
+-- original size: 36449, stripped down to: 20179
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -20248,8 +20248,8 @@ end -- of closure
-- used libraries : l-lua.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 836518
--- stripped bytes : 304209
+-- original bytes : 836573
+-- stripped bytes : 304264
-- end library merge