summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/node-inj.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-inj.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/node-inj.lua33
1 files changed, 31 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-inj.lua b/Master/texmf-dist/tex/context/base/node-inj.lua
index b91646ffc1a..402403529c6 100644
--- a/Master/texmf-dist/tex/context/base/node-inj.lua
+++ b/Master/texmf-dist/tex/context/base/node-inj.lua
@@ -56,7 +56,7 @@ local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
local a_kernpair = attributes.private('kernpair')
------ a_ligacomp = attributes.private('ligacomp')
+local a_ligacomp = attributes.private('ligacomp')
local a_markbase = attributes.private('markbase')
local a_markmark = attributes.private('markmark')
local a_markdone = attributes.private('markdone')
@@ -64,6 +64,8 @@ local a_cursbase = attributes.private('cursbase')
local a_curscurs = attributes.private('curscurs')
local a_cursdone = attributes.private('cursdone')
+local unsetvalue = attributes.unsetvalue
+
-- This injector has been tested by Idris Samawi Hamid (several arabic fonts as well as
-- the rather demanding Husayni font), Khaled Hosny (latin and arabic) and Kaj Eigner
-- (arabic, hebrew and thai) and myself (whatever font I come across). I'm pretty sure
@@ -84,6 +86,33 @@ local kerns = { }
-- For the moment we pass the r2l key ... volt/arabtype tests .. idris: this needs
-- checking with husayni (volt and fontforge).
+function injections.reset(n)
+-- if getattr(n,a_kernpair) then
+-- setattr(n,a_kernpair,unsetvalue)
+-- end
+-- if getattr(n,a_markdone) then
+-- setattr(n,a_markbase,unsetvalue)
+-- setattr(n,a_markmark,unsetvalue)
+-- setattr(n,a_markdone,unsetvalue)
+-- end
+-- if getattr(n,a_cursdone) then
+-- setattr(n,a_cursbase,unsetvalue)
+-- setattr(n,a_curscurs,unsetvalue)
+-- setattr(n,a_cursdone,unsetvalue)
+-- end
+-- if getattr(n,a_ligacomp) then
+-- setattr(n,a_ligacomp,unsetvalue)
+-- end
+end
+
+function injections.setligaindex(n,index)
+ setattr(n,a_ligacomp,index)
+end
+
+function injections.getligaindex(n,default)
+ return getattr(n,a_ligacomp) or default
+end
+
function injections.setcursive(start,nxt,factor,rlmode,exit,entry,tfmstart,tfmnext)
local dx, dy = factor*(exit[1]-entry[1]), factor*(exit[2]-entry[2])
local ws, wn = tfmstart.width, tfmnext.width
@@ -343,7 +372,7 @@ function injections.handler(head,where,keep)
for i=maxt,1,-1 do
ny = ny + d[i]
local ti = t[i]
- setfield(ti,"yoffset",ny)
+ setfield(ti,"yoffset",ny) -- maybe add to current yoffset
end
maxt = 0
end