summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-gbn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-gbn.lua')
-rw-r--r--tex/context/base/mkiv/font-gbn.lua16
1 files changed, 11 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/font-gbn.lua b/tex/context/base/mkiv/font-gbn.lua
index 1f8df642c..8f1acac65 100644
--- a/tex/context/base/mkiv/font-gbn.lua
+++ b/tex/context/base/mkiv/font-gbn.lua
@@ -13,6 +13,8 @@ if context then
os.exit()
end
+local next = next
+
local fonts = fonts
local nodes = nodes
@@ -71,7 +73,8 @@ function nodes.handlers.setbasemodepass(v)
basemodepass = v
end
-function nodes.handlers.nodepass(head)
+-------- nodes.handlers.nodepass(head)
+function nodes.handlers.nodepass(head,groupcode,size,packtype,direction)
local fontdata = fonts.hashes.identifiers
if fontdata then
local nuthead = tonut(head)
@@ -81,6 +84,7 @@ function nodes.handlers.nodepass(head)
local basefont = nil
local variants = nil
local redundant = nil
+ local nofused = 0
for n in traverse_id(glyph_code,nuthead) do
local font = getfont(n)
if font ~= prevfont then
@@ -97,6 +101,7 @@ function nodes.handlers.nodepass(head)
local processors = shared.processes
if processors and #processors > 0 then
usedfonts[font] = processors
+ nofused = nofused + 1
elseif basemodepass then
basefont = { n, nil }
basefonts[#basefonts+1] = basefont
@@ -178,6 +183,7 @@ function nodes.handlers.nodepass(head)
local processors = shared.processes
if processors and #processors > 0 then
usedfonts[font] = processors
+ nofused = nofused + 1
end
end
end
@@ -189,7 +195,7 @@ function nodes.handlers.nodepass(head)
if next(usedfonts) then
for font, processors in next, usedfonts do
for i=1,#processors do
- head = processors[i](head,font,0) or head
+ head = processors[i](head,font,0,direction,nofused) or head
end
end
end
@@ -229,7 +235,7 @@ function nodes.handlers.nodepass(head)
end
function nodes.handlers.basepass(head)
- if not basemodepass then
+ if basemodepass then
head = n_ligaturing(head)
head = n_kerning(head)
end
@@ -241,9 +247,9 @@ local basepass = nodes.handlers.basepass
local injectpass = nodes.injections.handler
local protectpass = nodes.handlers.protectglyphs
-function nodes.simple_font_handler(head)
+function nodes.simple_font_handler(head,groupcode,size,packtype,direction)
if head then
- head = nodepass(head)
+ head = nodepass(head,groupcode,size,packtype,direction)
head = injectpass(head)
if not basemodepass then
head = basepass(head)