summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-fonts-features.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-04-11 20:12:40 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-04-11 20:12:40 +0200
commit1e69816bbbeebedafd52684fc4182ce977d92a8a (patch)
tree06d7cfe0c8490e66eb8f6447bd6f9c50afb8d90e /tex/context/modules/mkiv/s-fonts-features.lua
parentc1224cc330e695938cfcf944f8e9d0c14c15fa8c (diff)
downloadcontext-1e69816bbbeebedafd52684fc4182ce977d92a8a.tar.gz
2022-04-11 19:22:00
Diffstat (limited to 'tex/context/modules/mkiv/s-fonts-features.lua')
-rw-r--r--tex/context/modules/mkiv/s-fonts-features.lua57
1 files changed, 57 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/s-fonts-features.lua b/tex/context/modules/mkiv/s-fonts-features.lua
index eb64e4c8f..2a1d36e14 100644
--- a/tex/context/modules/mkiv/s-fonts-features.lua
+++ b/tex/context/modules/mkiv/s-fonts-features.lua
@@ -298,3 +298,60 @@ function moduledata.fonts.features.showallligatures(specification)
context.par()
end
end
+
+
+function moduledata.fonts.features.showallfeatures(specification)
+ specification = interfaces.checkedspecification(specification)
+ local id, cs = fonts.definers.internal(specification,"<module:fonts:features:font>")
+ local tfmdata = fonts.hashes.identifiers[id]
+ local sequences = tfmdata.resources.sequences
+
+ context.starttabulate { "|T|T|Tc|T|T|Tp|" }
+
+ NC() context.bold("\\letterhash")
+ NC() context.bold("type")
+ NC() context.bold("\\letterhash steps")
+ NC() context.bold("feature")
+ NC() context.bold("script")
+ NC() context.bold("language")
+ NC() NR()
+ context.HL()
+
+ for i=1,#sequences do
+ local s = sequences[i]
+ local features = s.features
+ if features then
+ local done1 = false
+ NC() context(i)
+ NC() context(s.type)
+ NC() context(s.nofsteps)
+ for feature, scripts in table.sortedhash(features) do
+ NC()
+ if done1 then
+ NC() NC() NC()
+ else
+ context(feature)
+ done1 = true
+ end
+ local done2 = false
+ for script, languages in table.sortedhash(scripts) do
+ if done2 then
+ NC() NC() NC() NC()
+ else
+ done2 = true
+ end
+ NC() context(script)
+ NC() context("% t",table.sortedkeys(languages))
+ NC() context.NR()
+ end
+ end
+ else
+ NC() context(i)
+ NC() context(s.type)
+ NC() context(s.nofsteps)
+ NC() NC() NC() NC() NR()
+ end
+ end
+
+ context.stoptabulate()
+end