summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-fonts-features.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-19 01:38:26 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-19 01:38:26 +0200
commited42bd4c79946716033bf5dbedbd54bbe81f49e8 (patch)
treea3d63d74f0e07f799c538eb04096195b6b6d4631 /tex/context/modules/mkiv/s-fonts-features.lua
parent30b3a925bfc1857a31e23d9b17b8da0be572d02a (diff)
downloadcontext-ed42bd4c79946716033bf5dbedbd54bbe81f49e8.tar.gz
2016-08-19 00:35:00
Diffstat (limited to 'tex/context/modules/mkiv/s-fonts-features.lua')
-rw-r--r--tex/context/modules/mkiv/s-fonts-features.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/s-fonts-features.lua b/tex/context/modules/mkiv/s-fonts-features.lua
index f78300f32..6f4032948 100644
--- a/tex/context/modules/mkiv/s-fonts-features.lua
+++ b/tex/context/modules/mkiv/s-fonts-features.lua
@@ -13,6 +13,10 @@ moduledata.fonts.features = moduledata.fonts.features or { }
local sortedhash = table.sortedhash
+local v_yes = interfaces.variables.yes
+local v_no = interfaces.variables.no
+local c_name = interfaces.constants.name
+
local NC, NR, bold = context.NC, context.NR, context.bold
function moduledata.fonts.features.showused(specification)
@@ -207,3 +211,22 @@ function moduledata.fonts.features.showallkerns(specification)
context.par()
end
end
+
+function moduledata.fonts.features.showfeatureset(specification)
+ specification = interfaces.checkedspecification(specification)
+ local name = specification[c_name]
+ if name then
+ local s = fonts.specifiers.contextsetups[name]
+ if s then
+ local t = table.copy(s)
+ t.number = nil
+ if t and next(t) then
+ context.starttabulate { "|T|T|" }
+ for k, v in sortedhash(t) do
+ NC() context(k) NC() context(v == true and v_yes or v == false and v_no or tostring(v)) NC() NR()
+ end
+ context.stoptabulate()
+ end
+ end
+ end
+end