summaryrefslogtreecommitdiff
path: root/otfl-node-inj.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2009-06-10 23:24:34 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2009-06-11 01:10:16 +0300
commitf9a875c39c19e25a6744db40c39935c880a95cc0 (patch)
tree6b55a6b48750103fde80ee6091e3423112177c1f /otfl-node-inj.lua
parent1ef10e57241a65e8ce2aeefdd83874e8999b7b44 (diff)
downloadluaotfload-f9a875c39c19e25a6744db40c39935c880a95cc0.tar.gz
Sync with ConTeXt 2009.06.10 20:06, fixes bug with undefined fonts.register_message function that would crash luatex with certain fonts, pluse more.
Diffstat (limited to 'otfl-node-inj.lua')
-rw-r--r--otfl-node-inj.lua17
1 files changed, 12 insertions, 5 deletions
diff --git a/otfl-node-inj.lua b/otfl-node-inj.lua
index 6ba21b3..2e8b5ae 100644
--- a/otfl-node-inj.lua
+++ b/otfl-node-inj.lua
@@ -168,7 +168,7 @@ end
-- todo: reuse tables (i.e. no collection), but will be extra fields anyway
-function nodes.inject_kerns(head,tail,keep)
+function nodes.inject_kerns(head,tail,where,keep)
if trace_injections then
nodes.trace_injection(head)
end
@@ -176,10 +176,10 @@ function nodes.inject_kerns(head,tail,keep)
if has_marks or has_cursives then
-- in the future variant we will not copy items but refs to tables
local done, ky, rl, valid, cx, wx = false, { }, { }, { }, { }, { }
- for n in traverse_id(glyph,head) do
- if n.subtype < 256 then
- valid[#valid+1] = n
- if has_kerns then -- move outside loop
+ if has_kerns then -- move outside loop
+ for n in traverse_id(glyph,head) do
+ if n.subtype < 256 then
+ valid[#valid+1] = n
local k = has_attribute(n,kernpair)
if k then
local kk = kerns[k]
@@ -197,6 +197,12 @@ function nodes.inject_kerns(head,tail,keep)
end
end
end
+ else
+ for n in traverse_id(glyph,head) do
+ if n.subtype < 256 then
+ valid[#valid+1] = n
+ end
+ end
end
if #valid > 0 then
-- we can assume done == true because we have cursives and marks
@@ -215,6 +221,7 @@ function nodes.inject_kerns(head,tail,keep)
n = valid[i]
if n.font ~= nf then
nf = n.font
+--~ print(n.font,nf,fontdata[nf])
tm = fontdata[nf].marks
-- maybe flush
maxt = 0