From 01eb99bf60b6d94485a9deee54b4c259939ce3e8 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Thu, 21 Apr 2016 22:44:47 +0200 Subject: 2016-04-21 19:39:00 --- scripts/context/lua/mtx-fonts.lua | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua index f881e3d3b..7af80a156 100644 --- a/scripts/context/lua/mtx-fonts.lua +++ b/scripts/context/lua/mtx-fonts.lua @@ -240,22 +240,28 @@ local function fontweight(fw) end end +local function indeed(f,s) + if s and s ~= "" then + report(f,s) + end +end + local function showfeatures(tag,specification) report() - report("mapping : %s",tag) - report("fontname : %s",specification.fontname) - report("fullname : %s",specification.fullname) - report("filename : %s",specification.filename) - report("family : %s",specification.familyname or "") - -- report("subfamily : %s",specification.subfamilyname or "") - report("weight : %s",specification.weight or "") - report("style : %s",specification.style or "") - report("width : %s",specification.width or "") - report("variant : %s",specification.variant or "") - report("subfont : %s",subfont(specification.subfont)) - report("fweight : %s",fontweight(specification.fontweight)) + indeed("mapping : %s",tag) + indeed("fontname : %s",specification.fontname) + indeed("fullname : %s",specification.fullname) + indeed("filename : %s",specification.filename) + indeed("family : %s",specification.familyname or "") + -- indeed("subfamily : %s",specification.subfamilyname or "") + indeed("weight : %s",specification.weight or "") + indeed("style : %s",specification.style or "") + indeed("width : %s",specification.width or "") + indeed("variant : %s",specification.variant or "") + indeed("subfont : %s",subfont(specification.subfont)) + indeed("fweight : %s",fontweight(specification.fontweight)) -- maybe more - local features = fonts.helpers.getfeatures(specification.filename,specification.format) + local features = fonts.helpers.getfeatures(specification.filename,not getargument("nosave")) if features then for what, v in table.sortedhash(features) do local data = features[what] -- cgit v1.2.3