summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-fonts.lua24
1 files changed, 21 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index 64b04d780..c617524f4 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -268,7 +268,7 @@ local function showfeatures(tag,specification)
report()
indeed("instances : % t",instancenames)
end
- local features = fonts.helpers.getfeatures(specification.filename,not getargument("nosave"))
+ local features, tables = fonts.helpers.getfeatures(specification.filename,not getargument("nosave"))
if features then
for what, v in table.sortedhash(features) do
local data = features[what]
@@ -276,7 +276,7 @@ local function showfeatures(tag,specification)
report()
report("%s features:",what)
report()
- report("feature script languages")
+ report(" feature script languages")
report()
for f,ff in table.sortedhash(data) do
local done = false
@@ -288,7 +288,7 @@ local function showfeatures(tag,specification)
else
done = true
end
- report("% -8s % -8s % -8s",f,s,concat(table.sortedkeys(ss), " ")) -- todo: padd 4
+ report(" % -8s % -8s % -8s",f,s,concat(table.sortedkeys(ss), " ")) -- todo: padd 4
end
end
end
@@ -296,6 +296,24 @@ local function showfeatures(tag,specification)
else
report("no features")
end
+ if tables then
+ tables = table.tohash(tables)
+ local methods = {
+ overlay = (tables.colr or tables.cpal) and { format = "cff/ttf", feature = "color:overlay" } or nil,
+ bitmap = (tables.cblc or tables.cbdt) and { format = "png", feature = "color:bitmap" } or nil,
+ outline = (tables.svg ) and { format = "svg", feature = "color:svg" } or nil,
+ }
+ if next(methods) then
+ report()
+ report("color features:")
+ report()
+ report(" method feature formats")
+ report()
+ for k, v in table.sortedhash(methods) do
+ report(" % -8s % -14s %s",k,v.feature,v.format)
+ end
+ end
+ end
report()
collectgarbage("collect")
end