summaryrefslogtreecommitdiff
path: root/src/fontloader
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-02-06 21:24:03 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2017-02-06 21:24:03 +0100
commit94649446c7d25187901b396845067dc7d8b7d61d (patch)
tree734d40fdbae37f1d2a2d0f525a5fcb7a2759a60f /src/fontloader
parent9b70f2ee9e20830cfb39ca3b139e6f3aa04be1f1 (diff)
downloadluaotfload-94649446c7d25187901b396845067dc7d8b7d61d.tar.gz
[fontloader] informal patch by Hans
Diffstat (limited to 'src/fontloader')
-rw-r--r--src/fontloader/misc/fontloader-font-gbn.lua19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/fontloader/misc/fontloader-font-gbn.lua b/src/fontloader/misc/fontloader-font-gbn.lua
index 1f8df64..21c6061 100644
--- a/src/fontloader/misc/fontloader-font-gbn.lua
+++ b/src/fontloader/misc/fontloader-font-gbn.lua
@@ -37,6 +37,7 @@ local getdisc = nuts.getdisc
local setchar = nuts.setchar
local setlink = nuts.setlink
local setprev = nuts.setprev
+local nodetail = nuts.tail
-- from now on we apply ligaturing and kerning here because it might interfere with complex
-- opentype discretionary handling where the base ligature pass expect some weird extra
@@ -200,21 +201,15 @@ function nodes.handlers.nodepass(head)
local stop = range[2]
if start then
local front = nuthead == start
- local prev, next
+ if not stop then
+ stop = nodetail(start)
+ end
if stop then
- next = getnext(stop)
start, stop = ligaturing(start,stop)
start, stop = kerning(start,stop)
- else
- prev = getprev(start)
- start = ligaturing(start)
- start = kerning(start)
- end
- if prev then
- setlink(prev,start)
- end
- if next then
- setlink(stop,next)
+ elseif start then -- safeguard
+ start, stop = ligaturing(start,stop)
+ start, stop = kerning(start,stop)
end
if front and nuthead ~= start then
head = tonode(start)