summaryrefslogtreecommitdiff
path: root/tex/context/base/font-inj.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-07-01 23:15:05 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-07-01 23:15:05 +0200
commit865735f6a380cd9a5b5eb1b64d4c82b78e7c0ed1 (patch)
tree7684538cdd4ba6a2d0ee57005bfdc0d406555bd5 /tex/context/base/font-inj.lua
parentce4c6e98782de9bab14ed3963c403edbac974879 (diff)
downloadcontext-865735f6a380cd9a5b5eb1b64d4c82b78e7c0ed1.tar.gz
2015-07-01 21:42:00
Diffstat (limited to 'tex/context/base/font-inj.lua')
-rw-r--r--tex/context/base/font-inj.lua23
1 files changed, 16 insertions, 7 deletions
diff --git a/tex/context/base/font-inj.lua b/tex/context/base/font-inj.lua
index 332e92033..783d67425 100644
--- a/tex/context/base/font-inj.lua
+++ b/tex/context/base/font-inj.lua
@@ -285,7 +285,7 @@ function injections.setkern(current,factor,rlmode,x,injection)
end
end
-function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=baseanchor, ma=markanchor
+function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase,mkmk) -- ba=baseanchor, ma=markanchor
local dx, dy = factor*(ba[1]-ma[1]), factor*(ba[2]-ma[2])
nofregisteredmarks = nofregisteredmarks + 1
-- markanchors[nofregisteredmarks] = base
@@ -293,14 +293,20 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=basean
dx = tfmbase.width - dx -- see later commented ox
end
local p = rawget(properties,start)
+ -- hm, dejavu serif does a sloppy mark2mark before mark2base
if p then
local i = rawget(p,"injections")
if i then
+if i.markmark then
+ -- out of order mkmk: yes or no or option
+else
i.markx = dx
i.marky = dy
i.markdir = rlmode or 0
i.markbase = nofregisteredmarks
i.markbasenode = base
+ i.markmark = mkmk
+end
else
p.injections = {
markx = dx,
@@ -308,6 +314,7 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=basean
markdir = rlmode or 0,
markbase = nofregisteredmarks,
markbasenode = base,
+ markmark = mkmk,
}
end
else
@@ -318,6 +325,7 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=basean
markdir = rlmode or 0,
markbase = nofregisteredmarks,
markbasenode = base,
+ markmark = mkmk,
},
}
end
@@ -548,12 +556,13 @@ local function inject_marks(marks,nofmarks)
setfield(n,"xoffset",ox)
--
local py = getfield(p,"yoffset")
- local oy = 0
- if marks[p] then
- oy = py + pn.marky
- else
- oy = getfield(n,"yoffset") + py + pn.marky
- end
+-- local oy = 0
+-- if marks[p] then
+-- oy = py + pn.marky
+-- else
+-- oy = getfield(n,"yoffset") + py + pn.marky
+-- end
+ local oy = getfield(n,"yoffset") + py + pn.marky
setfield(n,"yoffset",oy)
else
-- normally this can't happen (only when in trace mode which is a special case anyway)