diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-11-26 13:15:05 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-11-26 13:15:05 +0100 |
commit | 5e624488bd860906c17301941c96e6209a9e4cd6 (patch) | |
tree | 1a517cfd2d5d4787879fdd3673f0d123c970c9b9 /tex/context/base/font-ctx.lua | |
parent | 156e528557cf571eb99ab05a0892429b3c2bf269 (diff) | |
download | context-5e624488bd860906c17301941c96e6209a9e4cd6.tar.gz |
2014-11-26 12:52:00
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 2a12a807a..f764edb6d 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -2091,11 +2091,11 @@ end) directives.register("nodes.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end) --- here +-- here (todo: closure) local trace_analyzing = false trackers.register("otf.analyzing", function(v) trace_analyzing = v end) -local otffeatures = constructors.newfeatures("otf") +----- otffeatures = constructors.newfeatures("otf") local registerotffeature = otffeatures.register local analyzers = fonts.analyzers @@ -2198,3 +2198,26 @@ function commands.purefontname(name) context(file.basename(name)) end end + +local list = storage.shared.bodyfontsizes or { } +storage.shared.bodyfontsizes = list + +function commands.registerbodyfontsize(size) + list[size] = true +end + +function commands.getbodyfontsizes(separator) + context(concat(sortedkeys(list),separator)) +end + +function commands.processbodyfontsizes(command) + local keys = sortedkeys(list) + if command then + local action = context[command] + for i=1,#keys do + action(keys[i]) + end + else + context(concat(keys,",")) + end +end |