diff options
author | Marius <mariausol@gmail.com> | 2012-08-16 23:40:21 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-08-16 23:40:21 +0300 |
commit | ecadb4b576efc36822610c9857a7ccb8967dd80a (patch) | |
tree | 2644288993eb0b1d8390df9ac3dfe78feb5de9d1 /tex/context/base/font-ctx.lua | |
parent | e44911a5d56ff3686f7c852425ae7f9456340867 (diff) | |
download | context-ecadb4b576efc36822610c9857a7ccb8967dd80a.tar.gz |
beta 2012.08.16 22:20
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 1badc090d..4961c4ae8 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -1601,3 +1601,18 @@ commands.definefontfeature = fonts.specifiers.presetcontext function commands.featurelist(...) context(fonts.specifiers.contexttostring(...)) end + +-- a fontkern plug: + +local copy_node = node.copy +local kern = nodes.pool.register(nodes.pool.kern()) + +node.set_attribute(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared + +nodes.injections.installnewkern(function(k) + local c = copy_node(kern) + c.kern = k + return c +end) + +directives.register("nodes.injections.fontkern", function(v) kern.subtype = v and 0 or 1 end) |