diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-08-16 22:20:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-08-16 22:20:00 +0200 |
commit | bc1e8c26c1c0596eb7410b522bff296fa6e7e2fc (patch) | |
tree | 82f6f25cd9d26e77a0c076cc1694e1d247f3cd19 /tex/context/base/font-ctx.lua | |
parent | 0dc23517ffebac8da38bbf8b4b8753d2a39848a7 (diff) | |
download | context-bc1e8c26c1c0596eb7410b522bff296fa6e7e2fc.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) |