From 64f50a1d7fe79d365b350c1bae688b9bf1b44d34 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 10 Oct 2019 15:29:49 +0200 Subject: 2019-10-10 14:28:00 --- scripts/context/lua/mtx-fonts.lua | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'scripts/context/lua/mtx-fonts.lua') 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 -- cgit v1.2.3