From ecadb4b576efc36822610c9857a7ccb8967dd80a Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 16 Aug 2012 23:40:21 +0300 Subject: beta 2012.08.16 22:20 --- tex/context/base/font-ctx.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tex/context/base/font-ctx.lua') 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) -- cgit v1.2.3