summaryrefslogtreecommitdiff
path: root/src/fontloader
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-02-11 00:24:02 +0100
committerGitHub <noreply@github.com>2017-02-11 00:24:02 +0100
commit9b4a3f094b8574b262d1636e9977c6a592399c0d (patch)
tree45332708058a9f2571d31ef9fb17ec9fc6151ff4 /src/fontloader
parent3094feb28d13a7ab5efec213ee31807db1976e98 (diff)
parentad480924393fffa2896156e1a32c22f5c61120dd (diff)
downloadluaotfload-9b4a3f094b8574b262d1636e9977c6a592399c0d.tar.gz
Merge pull request #407 from phi-gamma/masterHEADmaster
fixes, mostly
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)